Submission #510036

# Submission time Handle Problem Language Result Execution time Memory
510036 2022-01-14T14:40:27 Z MusSan07 Tarifa (COCI16_tarifa) C++17
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>
#define ll long long
#define endl "\n"
using namespace std;
pair<int , int>p[100007];
ll n,k,x,sum,z;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin>>x>>k;
    ll a[k];
    for(int i=0;i<k;i++){
        cin>>a[i];
        sum+=a[i];
    }
    z=x*(k+1);
    cout<<z-sum;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct