# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
23999 |
2017-05-29T02:22:26 Z |
Trathz |
Tarifa (COCI16_tarifa) |
C++ |
|
0 ms |
2020 KB |
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define int long long
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define ieps (int) 1e5 + 800
#define eps (int) 1e9
#define jmp exit(0)
int32_t main(){
int n;
cin>>n;
int q;
int atual = 0;
cin>>q;
while(q--){
atual+=n;
int x;
cin>>x;
atual = (atual - x);
}
cout<<atual + n;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
2020 KB |
Output is correct |
2 |
Correct |
0 ms |
2020 KB |
Output is correct |
3 |
Correct |
0 ms |
2020 KB |
Output is correct |
4 |
Correct |
0 ms |
2020 KB |
Output is correct |
5 |
Correct |
0 ms |
2020 KB |
Output is correct |
6 |
Correct |
0 ms |
2020 KB |
Output is correct |
7 |
Correct |
0 ms |
2020 KB |
Output is correct |
8 |
Correct |
0 ms |
2020 KB |
Output is correct |
9 |
Correct |
0 ms |
2020 KB |
Output is correct |
10 |
Correct |
0 ms |
2020 KB |
Output is correct |