15032022-11-21 14:31:53teodorbatkaiMicimackó (40 pont)cpp17Wrong answer 0/403ms4192 KiB
#include <iostream>

using namespace std;

int main(){
    int nt, mt, om, nm, x = om;
    cin >> nt >> mt >> om >> nm;

    for(int i = 0; i < mt; i++){
        if(x != 0){
            x--;
        }  
        if(i == nt-1){
            x += nm;
        }     
    }
    cout << x << endl;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1880 KiB
2Wrong answer0/02ms2116 KiB
3Wrong answer0/22ms2320 KiB
4Wrong answer0/22ms2584 KiB
5Wrong answer0/22ms2532 KiB
6Wrong answer0/22ms2600 KiB
7Wrong answer0/22ms2788 KiB
8Wrong answer0/22ms2856 KiB
9Wrong answer0/22ms3072 KiB
10Wrong answer0/22ms3276 KiB
11Wrong answer0/22ms3356 KiB
12Wrong answer0/22ms3236 KiB
13Wrong answer0/22ms3480 KiB
14Wrong answer0/22ms3688 KiB
15Wrong answer0/22ms3764 KiB
16Wrong answer0/22ms3772 KiB
17Wrong answer0/22ms4016 KiB
18Wrong answer0/22ms4120 KiB
19Wrong answer0/22ms4192 KiB
20Wrong answer0/22ms4192 KiB
21Wrong answer0/22ms4192 KiB
22Wrong answer0/22ms4192 KiB