Submission #1093375

# Submission time Handle Problem Language Result Execution time Memory
1093375 2024-09-26T17:59:30 Z JuanJL Tarifa (COCI16_tarifa) C++17
50 / 50
1 ms 604 KB
#include <bits/stdc++.h>

using namespace std;

#define forn(i,a,b) for(int i = a; i < b; i++)
typedef long long ll;

int main(){
    ll x; cin>>x; 
    ll n; cin>>n;
    ll aux;
    ll sum; sum=0;
    forn(i,0,n){
        cin>>aux; sum+=aux;
    }
    cout<<x*n - sum + x << '\n';
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct