Submission #163211

#TimeUsernameProblemLanguageResultExecution timeMemory
163211beso123Prosjek (COCI14_prosjek)C++14
50 / 50
2 ms384 KiB
#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)

prosjek.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...