# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
510061 | 2022-01-14T16:00:57 Z | Jean7 | Tarifa (COCI16_tarifa) | C++14 | 0 ms | 0 KB |
#include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define int long long using namespace std ; int main () { fastio int x , n , y , ans ; cin >> x >> n ; ans = x * (n+1) ; for ( int i = 0 ; i < n ; i++ ) { cin >> y ; ans -= y ; } cout << ans ; return 0 ; }