20382022-12-15 13:39:59szabel26Micimackó (40 pont)cpp17Accepted 40/403ms3680 KiB
#include <iostream>

using namespace std;

int y,x,k,n,akt;

int main()
{
    cin>>y>>x>>k>>n;
    if(k<y) akt=0;
        else akt=k-y;
    akt+=n;
    if(akt<x-y) akt=0;
        else akt-=(x-y);
    cout<<akt;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/03ms1876 KiB
2Accepted0/02ms2064 KiB
3Accepted2/22ms2420 KiB
4Accepted2/22ms2356 KiB
5Accepted2/22ms2480 KiB
6Accepted2/22ms2560 KiB
7Accepted2/22ms2688 KiB
8Accepted2/22ms2764 KiB
9Accepted2/22ms2892 KiB
10Accepted2/22ms2964 KiB
11Accepted2/22ms2964 KiB
12Accepted2/22ms2968 KiB
13Accepted2/22ms2968 KiB
14Accepted2/22ms2964 KiB
15Accepted2/22ms3128 KiB
16Accepted2/22ms3224 KiB
17Accepted2/22ms3360 KiB
18Accepted2/22ms3432 KiB
19Accepted2/22ms3452 KiB
20Accepted2/22ms3528 KiB
21Accepted2/22ms3568 KiB
22Accepted2/22ms3680 KiB