28182023-01-26 13:50:46KristófMicimackó (40 pont)cpp11Accepted 40/403ms4584 KiB
#include <iostream>

using namespace std;

int main()
{
     int n, k;
     int x,y;
     cin>>y;
     cin>>x;
     cin>>k;
     cin>>n;
     int eredmeny;

     eredmeny = k-y;
     if(eredmeny<0)
        eredmeny=0;
        eredmeny=eredmeny+n;
     eredmeny= eredmeny-(x-y);
     
     if(eredmeny<0)
        eredmeny=0;
     cout<<eredmeny;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/03ms2152 KiB
2Accepted0/02ms2204 KiB
3Accepted2/22ms2272 KiB
4Accepted2/22ms2524 KiB
5Accepted2/22ms2576 KiB
6Accepted2/22ms2704 KiB
7Accepted2/22ms2912 KiB
8Accepted2/22ms2912 KiB
9Accepted2/22ms3000 KiB
10Accepted2/22ms3240 KiB
11Accepted2/22ms3496 KiB
12Accepted2/22ms3688 KiB
13Accepted2/22ms3768 KiB
14Accepted2/22ms3688 KiB
15Accepted2/22ms3816 KiB
16Accepted2/22ms3888 KiB
17Accepted2/22ms3888 KiB
18Accepted2/22ms4136 KiB
19Accepted2/22ms4260 KiB
20Accepted2/22ms4220 KiB
21Accepted2/22ms4348 KiB
22Accepted2/22ms4584 KiB