Submission #377178

#TimeUsernameProblemLanguageResultExecution timeMemory
377178marat0210Tarifa (COCI16_tarifa)C++14
50 / 50
1 ms380 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >>x; long long n; cin >>n; vector <long long> a(n); for (int i = 0; i < n; ++i) { cin >>a[i]; } long long sum = x; for (int i = 0; i < n; ++i) { sum += x; sum -= a[i]; } cout <<sum<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...