Submission #167658

#TimeUsernameProblemLanguageResultExecution timeMemory
167658atoizTarifa (COCI16_tarifa)C++14
50 / 50
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORA(i, a) for (auto &i : a) #define FORB(i, a, b) for (int i = a; i >= b; --i) #define SZ(a) ((int) a.size()) #define ALL(a) a.begin(), a.end() int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int x, n; cin >> x >> n; int ans = x * (n + 1); FOR(i, 0, n - 1) { int y; cin >> y; ans -= y; } cout << ans << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...