# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
470165 | Karabasan | Tarifa (COCI16_tarifa) | C++17 | 1 ms | 332 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forcin for(int i=0;i<n;i++) scanf("%d",&dizi[i]);
#define forcout for(int i=0;i<n;i++) printf("%d ",dizi[i]);
#define ll long long
using namespace std;
int n,t;
int dizi[100005];
int toplam;
int x;
int main()
{
fast;
scanf("%d",&x);
scanf("%d",&n);
forcin;
for(int i=0;i<n;i++)
toplam+=x-dizi[i];
printf("%d",toplam+x);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |