28162023-01-26 13:50:09DalmMicimackó (40 pont)cpp11Accepted 40/403ms4280 KiB
#include <iostream>

using namespace std;

int main()
{
   int y,x;
   int k,n;

   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/03ms1876 KiB
2Accepted0/02ms2120 KiB
3Accepted2/22ms2324 KiB
4Accepted2/22ms2448 KiB
5Accepted2/22ms2640 KiB
6Accepted2/22ms2832 KiB
7Accepted2/22ms2820 KiB
8Accepted2/22ms3048 KiB
9Accepted2/22ms3232 KiB
10Accepted2/22ms3264 KiB
11Accepted2/22ms3528 KiB
12Accepted2/22ms3512 KiB
13Accepted2/22ms3544 KiB
14Accepted2/22ms3536 KiB
15Accepted2/22ms3624 KiB
16Accepted2/22ms3664 KiB
17Accepted2/22ms3868 KiB
18Accepted2/22ms3992 KiB
19Accepted2/22ms4164 KiB
20Accepted2/22ms4164 KiB
21Accepted2/22ms4160 KiB
22Accepted2/22ms4280 KiB