15042022-11-21 14:32:24teodorbatkaiMicimackó (40 pont)cpp11Wrong answer 0/403ms4380 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/03ms1876 KiB
2Wrong answer0/02ms1968 KiB
3Wrong answer0/22ms2168 KiB
4Wrong answer0/22ms2372 KiB
5Wrong answer0/22ms2448 KiB
6Wrong answer0/22ms2580 KiB
7Wrong answer0/22ms2780 KiB
8Wrong answer0/22ms2860 KiB
9Wrong answer0/22ms3124 KiB
10Wrong answer0/22ms3132 KiB
11Wrong answer0/22ms3328 KiB
12Wrong answer0/22ms3528 KiB
13Wrong answer0/22ms3604 KiB
14Wrong answer0/22ms3852 KiB
15Wrong answer0/22ms3932 KiB
16Wrong answer0/22ms3932 KiB
17Wrong answer0/22ms3920 KiB
18Wrong answer0/22ms4168 KiB
19Wrong answer0/22ms4132 KiB
20Wrong answer0/22ms4256 KiB
21Wrong answer0/22ms4380 KiB
22Wrong answer0/22ms4340 KiB