Sponsors

Tag: problem: (A) Straight Solution In C/C++

Codeforces Round #415 (Div....

#include <cstdio> int n,k,sum=0,mark; int main() { scanf("%d%d",&n,&k); for(int i=1;i<=n;i++)scanf("%d",&mark),sum+=mark; mark=(n*k-sum)*2-n; if(mark>0)printf("%d",mark); else printf("0"); }

Advertisement

spot_img