130012025-01-04 16:42:29brownwolfMicimackó (40 pont)csharpRuntime error 0/4014ms3012 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Micimacko
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int x = 0;
            int y = 0;
            int k=0;
            int n=0;
            int m = 0;

            string[] be = Console.ReadLine().Split(' ');
            y=int.Parse(be[0]);
            x=int.Parse(be[1]);
            be = Console.ReadLine().Split(' ');
            k=int.Parse(be[0]);
            n=int.Parse(be[1]);

            if (k > y)
                m = k - y;
            else
                m = 0;

            if (m+n > x-y)
                m=m+n-(x-y);
            else
                m=0;
            Console.Write(m);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Runtime error0/014ms2564 KiB
2Runtime error0/014ms2696 KiB
3Runtime error0/214ms2852 KiB
4Runtime error0/214ms2776 KiB
5Runtime error0/214ms2856 KiB
6Runtime error0/214ms2840 KiB
7Runtime error0/214ms2812 KiB
8Runtime error0/214ms2764 KiB
9Runtime error0/214ms2884 KiB
10Runtime error0/214ms2864 KiB
11Runtime error0/214ms3012 KiB
12Runtime error0/214ms2668 KiB
13Runtime error0/214ms2740 KiB
14Runtime error0/214ms2764 KiB
15Runtime error0/214ms2780 KiB
16Runtime error0/214ms2528 KiB
17Runtime error0/214ms2492 KiB
18Runtime error0/214ms2612 KiB
19Runtime error0/214ms2552 KiB
20Runtime error0/214ms2852 KiB
21Runtime error0/214ms2768 KiB
22Runtime error0/214ms2780 KiB