# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
167582 | EntityIT | Tarifa (COCI16_tarifa) | C++14 | 2 ms | 376 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;
#define all(x) (x).begin(), (x).end()
#define sz(x) ( (int)(x).size() )
#define fi first
#define se second
using LL = long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count() );
int x, n, ans;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> x >> n;
ans = (n + 1) * x;
while (n--) {
int p; cin >> p;
ans -= p;
}
cout << ans << '\n';
cout.flush();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |