Submission #133309

# Submission time Handle Problem Language Result Execution time Memory
133309 2019-07-20T11:52:04 Z Zex Tarifa (COCI16_tarifa) C++11
50 / 50
3 ms 376 KB
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define INF INT_MAX
#define output for(int i=0;i<sizex;i++) { for(int j=0;j<sizey;j++) { cout << moveChart[i][j] << " "; }cout<<endl; }cout<<endl;

int X, N;

int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

    cin >> X >> N;
    int saved = (N+1)*X;
    
    int x;
    while( N-- ){
        cin >> x; saved -= x;
    }

    cout << saved << endl;

}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 3 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct