Tag: problem: (B) Arpa’s obvious problem and Mehrdad’s terrible solution Solve in C/C++

Codeforces Round #383 (Div. 2), problem: (B) Arpa’s obvious problem and Mehrdad’s terrible solution , Solution in C/C++

#include<stdio.h> int v; int main(){ int i,l,n,x; long long int r; scanf("%d%d",&n,&x); for(i=0;i<n;i++) { scanf("%d",&l); r=r+v; v++; } printf("%I64d",r); return 0; }

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!