15022022-11-21 14:28:39teodorbatkaiMicimackó (40 pont)cpp17Wrong answer 0/403ms4084 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(i == nt){
            x += nm;
        }
        if(x > 0){
            x--;
        }       
    }
    cout << x << endl;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1872 KiB
2Wrong answer0/02ms2068 KiB
3Wrong answer0/22ms2268 KiB
4Wrong answer0/22ms2372 KiB
5Wrong answer0/22ms2576 KiB
6Wrong answer0/22ms2780 KiB
7Wrong answer0/22ms3024 KiB
8Wrong answer0/22ms3228 KiB
9Wrong answer0/22ms3388 KiB
10Wrong answer0/22ms3464 KiB
11Wrong answer0/22ms3596 KiB
12Wrong answer0/22ms3672 KiB
13Wrong answer0/22ms3676 KiB
14Wrong answer0/22ms3668 KiB
15Wrong answer0/22ms3800 KiB
16Wrong answer0/22ms3876 KiB
17Wrong answer0/22ms3876 KiB
18Wrong answer0/22ms3876 KiB
19Wrong answer0/22ms4004 KiB
20Wrong answer0/22ms4076 KiB
21Wrong answer0/22ms4084 KiB
22Wrong answer0/22ms4084 KiB