130052025-01-04 16:55:24brownwolfMicimackó (40 pont)csharpRuntime error 0/4014ms2900 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.WriteLine(m);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Runtime error0/014ms2868 KiB
2Runtime error0/014ms2800 KiB
3Runtime error0/214ms2552 KiB
4Runtime error0/214ms2772 KiB
5Runtime error0/214ms2672 KiB
6Runtime error0/214ms2844 KiB
7Runtime error0/214ms2760 KiB
8Runtime error0/214ms2480 KiB
9Runtime error0/214ms2772 KiB
10Runtime error0/214ms2528 KiB
11Runtime error0/214ms2792 KiB
12Runtime error0/214ms2844 KiB
13Runtime error0/214ms2652 KiB
14Runtime error0/214ms2852 KiB
15Runtime error0/214ms2768 KiB
16Runtime error0/214ms2848 KiB
17Runtime error0/214ms2768 KiB
18Runtime error0/214ms2792 KiB
19Runtime error0/214ms2796 KiB
20Runtime error0/214ms2888 KiB
21Runtime error0/214ms2900 KiB
22Runtime error0/214ms2760 KiB