Submission #133288

# Submission time Handle Problem Language Result Execution time Memory
133288 2019-07-20T11:21:21 Z Blagojce Tarifa (COCI16_tarifa) C++11
50 / 50
2 ms 376 KB
#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x),end(x)

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
ll const inf = 1e9;
ll const mod = 1e9 + 7;
ld const eps = 1e-9;

int main()
{
        int x, n;
        cin >> x >> n;
        int tot = 0;
        fr(i, 0, n){
                tot += x;
                int lost;
                cin >> lost;
                tot -= lost;
        }
        tot += x;
        cout << tot << endl;
        return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 256 KB Output is correct
10 Correct 2 ms 256 KB Output is correct