# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23050 | model_code | Tarifa (COCI16_tarifa) | C++11 | 0 ms | 1116 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 <cstdio>
using namespace std;
const int MAXN = 110;
int x, n;
int a[MAXN];
int main() {
scanf("%d%d", &x, &n);
int sum = 0;
for(int i=0; i<n; i++){
scanf("%d", a+i);
sum += a[i];
}
printf("%d\n", x * (n + 1) - sum);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |