35162023-02-28 14:52:31tothgergelyMicimackó (40 pont)csharpWrong answer 0/4032ms25636 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mici
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] tomb = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int ny = tomb[0];
            int m = tomb[1];
            int[] tomb2 = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int o = tomb2[0];
            int nym = tomb2[1];
            int mez = 0;
            if (ny - o > 0 && m - nym > 0)
            {
                mez = ny - o + m - nym;
            }
            else if (ny - o <= 0 && m - nym <= 0)
            {
                mez = 0;
            }
            else if (ny - o > 0 && m - nym <= 0 )
            {
                mez = ny - o;
            }
            else if (ny - m <= 0 && m - nym > 0)
            {
                mez = m - nym;
            }
            Console.WriteLine(mez);
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/030ms22292 KiB
2Wrong answer0/032ms22476 KiB
3Wrong answer0/232ms23080 KiB
4Wrong answer0/230ms23300 KiB
5Wrong answer0/230ms22952 KiB
6Wrong answer0/230ms23296 KiB
7Wrong answer0/232ms23860 KiB
8Wrong answer0/230ms24248 KiB
9Wrong answer0/232ms24256 KiB
10Wrong answer0/232ms24496 KiB
11Wrong answer0/230ms24836 KiB
12Wrong answer0/232ms24912 KiB
13Wrong answer0/232ms24916 KiB
14Wrong answer0/230ms25192 KiB
15Wrong answer0/232ms25120 KiB
16Wrong answer0/230ms25200 KiB
17Wrong answer0/229ms25148 KiB
18Wrong answer0/229ms25288 KiB
19Wrong answer0/229ms25480 KiB
20Wrong answer0/229ms25596 KiB
21Wrong answer0/229ms25448 KiB
22Wrong answer0/232ms25636 KiB