# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
90709 | AntonioDaki | Prosjek (COCI14_prosjek) | C++14 | 2 ms | 904 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()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
long long a[102], b[102];
cin >> n;
for(int i = 0; i < n; ++i){
cin >> b[i];
m = b[i] * (i + 1);
for(int j = i - 1; j >= 0; --j) m -= a[j];
a[i] = m;
cout << m << ' ';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |