Submission #960232

#TimeUsernameProblemLanguageResultExecution timeMemory
960232khangrlProsjek (COCI14_prosjek)C++14
0 / 50
0 ms348 KiB
#include<bits/stdc++.h> #define ll long long #define ff first #define ss second #define pb push_back using namespace std; int main(){ ll sum[105], ans[105], n; cin>>n; sum[0]=0; for(int i=1; i<=n; i++){ int a; cin>>a; ans[i]=a*i-sum[i-1]; sum[i]=sum[i-1]+ans[i]; } for(int i=1; i<=n; i++){ cout<<ans[i]<<" "; } }
#Verdict Execution timeMemoryGrader output
Fetching results...