# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
201080 | SamAnd | Tarifa (COCI16_tarifa) | C++17 | 6 ms | 380 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 <bits/stdc++.h>
using namespace std;
const int N = 102;
int x, n;
int a[N];
int main()
{
scanf("%d%d", &x, &n);
for (int i = 1; i <= n; ++i)
scanf("%d", &a[i]);
int ans = 0;
for (int i = 1; i <= n; ++i)
{
ans += x;
ans -= a[i];
}
ans += x;
printf("%d\n", ans);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |