#include <iostream>
using namespace std;
int main() {
int mb;
cin >> mb;
int months;
cin >> months;
int nextmonth = mb;
for (int i = 0;i < months;i++){
int a;
cin >> a;
nextmonth += mb - a;
}
cout << nextmonth;
return 0;
}
# |
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 |