129982025-01-04 16:30:58brownwolfMicimackó (40 pont)csharpRuntime error 0/4014ms3288 KiB
using System;

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/014ms2588 KiB
2Runtime error0/014ms2848 KiB
3Runtime error0/214ms2772 KiB
4Runtime error0/214ms2816 KiB
5Runtime error0/214ms2572 KiB
6Runtime error0/214ms2964 KiB
7Runtime error0/214ms2776 KiB
8Runtime error0/214ms2544 KiB
9Runtime error0/214ms2528 KiB
10Runtime error0/214ms2548 KiB
11Runtime error0/214ms2848 KiB
12Runtime error0/214ms2876 KiB
13Runtime error0/214ms2736 KiB
14Runtime error0/214ms2620 KiB
15Runtime error0/214ms2836 KiB
16Runtime error0/214ms2796 KiB
17Runtime error0/214ms3288 KiB
18Runtime error0/214ms2856 KiB
19Runtime error0/214ms2736 KiB
20Runtime error0/214ms2764 KiB
21Runtime error0/214ms2772 KiB
22Runtime error0/214ms2772 KiB