Submission #42112

#TimeUsernameProblemLanguageResultExecution timeMemory
42112wasylTarifa (COCI16_tarifa)C++11
50 / 50
2 ms752 KiB
#include <bits/stdc++.h> #ifndef dbg #define dbg(...) #endif #define all(x) begin(x), end(x) #define rsz(...) resize(__VA_ARGS__) #define psh(...) push_back(__VA_ARGS__) #define emp(...) emplace_back(__VA_ARGS__) #define prt(...) print(cout, __VA_ARGS__) #define dprt(...) dbg(print(cerr,__VA_ARGS__)) #define dmp(...) dprt(#__VA_ARGS__, '=', __VA_ARGS__) using namespace std;using ll=long long; template<typename t>using V=vector<t>; template<typename t>void print(ostream& os, const t& a){os<<a<<'\n';} template<typename t, typename... A>void print (ostream& os, const t& a, A&&... b){os<<a<<' ';print(os, b...);} int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int x; cin >> x; int cnt = x; int n; cin >> n; for (int i = 0; i < n; ++i) { int p; cin >> p; cnt -= p; cnt += x; } prt(cnt); }
#Verdict Execution timeMemoryGrader output
Fetching results...