15012022-11-21 14:26:03teodorbatkaiMicimackó (40 pont)cpp17Wrong answer 0/403ms3820 KiB
#include <bits/stdc++.h>

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-1){
            x += nm;
        }
        if(x > 0){
            x--;
        }       
    }
    cout << x << endl;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1876 KiB
2Wrong answer0/02ms2068 KiB
3Wrong answer0/22ms2208 KiB
4Wrong answer0/22ms2544 KiB
5Wrong answer0/22ms2624 KiB
6Wrong answer0/22ms2824 KiB
7Wrong answer0/22ms2988 KiB
8Wrong answer0/22ms3068 KiB
9Wrong answer0/22ms3068 KiB
10Wrong answer0/22ms3200 KiB
11Wrong answer0/22ms3396 KiB
12Wrong answer0/22ms3408 KiB
13Wrong answer0/22ms3404 KiB
14Wrong answer0/22ms3408 KiB
15Wrong answer0/22ms3556 KiB
16Wrong answer0/22ms3580 KiB
17Wrong answer0/22ms3632 KiB
18Wrong answer0/22ms3616 KiB
19Wrong answer0/22ms3612 KiB
20Wrong answer0/22ms3732 KiB
21Wrong answer0/22ms3808 KiB
22Wrong answer0/22ms3820 KiB