Submission #661886

#TimeUsernameProblemLanguageResultExecution timeMemory
661886gabruproProsjek (COCI14_prosjek)C++14
50 / 50
1 ms304 KiB
#include<iostream> #include<vector> using namespace std; #define ll long long int main(){ int n; cin>>n; vector<ll> v(n); vector<ll> ans(n); for(int i=0;i<n;i++){cin>>v[i];} ans[0] = v[0]; for(int i=1;i<n;i++){ ans[i] = v[i]*(i+1) - v[i-1]*i; } for(int i=0;i<n;i++){cout<<ans[i]<<' ';} }
#Verdict Execution timeMemoryGrader output
Fetching results...