# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
568707 | Garguy22 | Tarifa (COCI16_tarifa) | C++17 | 1 ms | 300 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |