130062025-01-04 16:59:17brownwolfMicimackó (40 pont)csharpRuntime error 0/4016ms2880 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/014ms2772 KiB
2Runtime error0/014ms2776 KiB
3Runtime error0/214ms2776 KiB
4Runtime error0/214ms2832 KiB
5Runtime error0/214ms2872 KiB
6Runtime error0/216ms2732 KiB
7Runtime error0/216ms2740 KiB
8Runtime error0/214ms2784 KiB
9Runtime error0/214ms2784 KiB
10Runtime error0/214ms2592 KiB
11Runtime error0/214ms2880 KiB
12Runtime error0/214ms2688 KiB
13Runtime error0/214ms2740 KiB
14Runtime error0/214ms2736 KiB
15Runtime error0/214ms2520 KiB
16Runtime error0/214ms2724 KiB
17Runtime error0/214ms2528 KiB
18Runtime error0/214ms2772 KiB
19Runtime error0/214ms2832 KiB
20Runtime error0/214ms2780 KiB
21Runtime error0/214ms2512 KiB
22Runtime error0/214ms2800 KiB