Submission #568707

# Submission time Handle Problem Language Result Execution time Memory
568707 2022-05-26T05:53:35 Z Garguy22 Tarifa (COCI16_tarifa) C++17
50 / 50
1 ms 300 KB
#include <iostream>
using namespace std;

const int MAXN = 107;

int p[MAXN];

int main() {
    
    int x, n;
    cin >> x >> n;
    for(int i = 1; i <= n; i++){
        cin >> p[i];
    }
    int ans = (n+1)*x;
    for(int i = 1; i <= n; i++){
        ans -= p[i];
    }
    cout << ans << endl;
    
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 232 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct