# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163211 | beso123 | Prosjek (COCI14_prosjek) | C++14 | 2 ms | 384 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 int long long
using namespace std;
int n,a[105];
main(){
cin>>n;
for(int k=1;k<=n;k++)
cin>>a[k];
int sum=a[1];
cout<<a[1]<<' ';
for(int k=2;k<=n;k++){
int h=a[k]*k-sum;
sum+=h;
cout<<h<<' ';
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |