129192025-01-03 15:32:54PappMatyasMicimackó (40 pont)python3Runtime error 0/4016ms3180 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, m, a, b, ans;
    cin >> n >> m >> a >> b;
    if(n < a)
    {
        ans = a - n;
    }
    else
    {
        ans = 0;
    }
    if(ans + b > m - n)
    {
        ans = ans + b - m + n;
    }
    else
    {
        ans = 0;
    }
    cout << ans;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Runtime error0/016ms2868 KiB
2Runtime error0/016ms2872 KiB
3Runtime error0/214ms2876 KiB
4Runtime error0/216ms2884 KiB
5Runtime error0/214ms2888 KiB
6Runtime error0/216ms3040 KiB
7Runtime error0/214ms2960 KiB
8Runtime error0/216ms3072 KiB
9Runtime error0/216ms3180 KiB
10Runtime error0/214ms2868 KiB
11Runtime error0/216ms2944 KiB
12Runtime error0/216ms2872 KiB
13Runtime error0/216ms2828 KiB
14Runtime error0/214ms3044 KiB
15Runtime error0/214ms2836 KiB
16Runtime error0/216ms2932 KiB
17Runtime error0/216ms3116 KiB
18Runtime error0/216ms2876 KiB
19Runtime error0/216ms2884 KiB
20Runtime error0/214ms2864 KiB
21Runtime error0/214ms2872 KiB
22Runtime error0/216ms3072 KiB