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