# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
661886 | gabrupro | Prosjek (COCI14_prosjek) | C++14 | 1 ms | 304 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<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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |