Submission #863150

#TimeUsernameProblemLanguageResultExecution timeMemory
863150MilosMilutinovicTarifa (COCI16_tarifa)C++14
50 / 50
1 ms604 KiB
#include<bits/stdc++.h> #define pb push_back #define fi first #define se second #define mp make_pair using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef long double ld; template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;} template <typename T> bool chkmax(T &x,T y){return x<y?x=y,1:0;} int readint(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } int x,n; int main(){ x=readint(); n=readint(); int res=x; for(int i=1;i<=n;i++){ int p=readint(); res+=x-p; } printf("%d\n",res); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...