#include<bits/stdc++.h>
using namespace std;
int main()
{
int x;
cin>>x;
int n;
cin>>n;
int a;
int last=0;
for(int i=0;i<n;i++)
{
cin>>a;
last+=x;
last-=a;
last=max(last,0);
}
cout<<last+10<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
3 ms |
488 KB |
Output isn't correct |
3 |
Incorrect |
3 ms |
488 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
488 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
488 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
488 KB |
Output isn't correct |
7 |
Incorrect |
3 ms |
488 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
488 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
632 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
632 KB |
Output isn't correct |