Submission #931394

#TimeUsernameProblemLanguageResultExecution timeMemory
931394AtinaRProsjek (COCI14_prosjek)C++14
50 / 50
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; long long niza[n]; for(long long i=0; i<n; i++) { cin>>niza[i]; } vector<long long> res; res.push_back(niza[0]); long long sum=niza[0]; for(long long i=1; i<n; i++) { long long passed=i+1; long long tmp=niza[i]*passed-sum; res.push_back(tmp); sum+=tmp; } for(auto x:res)cout<<x<<" "; cout<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...