#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+1;
const int inf = 1e9;
const long long INFZ = 1e18;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int x, n; cin>>x>>n;
int pre=0;
for (int i=1; i<=n; i++)
{
int a; cin>>a;
int z=10+pre;
z-=a;
pre=max(z, 0);
}
cout<<pre+x;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
352 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
408 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |