130042025-01-04 16:53:32brownwolfMicimackó (40 pont)csharpRuntime error 0/4014ms3008 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/014ms2612 KiB
2Runtime error0/014ms2776 KiB
3Runtime error0/214ms2772 KiB
4Runtime error0/214ms2864 KiB
5Runtime error0/214ms2760 KiB
6Runtime error0/214ms2588 KiB
7Runtime error0/214ms2872 KiB
8Runtime error0/214ms2652 KiB
9Runtime error0/214ms2528 KiB
10Runtime error0/214ms2960 KiB
11Runtime error0/214ms2776 KiB
12Runtime error0/214ms2800 KiB
13Runtime error0/214ms2528 KiB
14Runtime error0/214ms2892 KiB
15Runtime error0/214ms2856 KiB
16Runtime error0/214ms3008 KiB
17Runtime error0/214ms2952 KiB
18Runtime error0/214ms2700 KiB
19Runtime error0/214ms2836 KiB
20Runtime error0/214ms2840 KiB
21Runtime error0/214ms2780 KiB
22Runtime error0/214ms2744 KiB