Submission #167582

#TimeUsernameProblemLanguageResultExecution timeMemory
167582EntityITTarifa (COCI16_tarifa)C++14
50 / 50
2 ms376 KiB
#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 timeMemoryGrader output
Fetching results...