Submission #568707

#TimeUsernameProblemLanguageResultExecution timeMemory
568707Garguy22Tarifa (COCI16_tarifa)C++17
50 / 50
1 ms300 KiB
#include <iostream> using namespace std; const int MAXN = 107; int p[MAXN]; int main() { int x, n; cin >> x >> n; for(int i = 1; i <= n; i++){ cin >> p[i]; } int ans = (n+1)*x; for(int i = 1; i <= n; i++){ ans -= p[i]; } cout << ans << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...