# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1276749 | BehruzbekX | Prosjek (COCI14_prosjek) | C++20 | 1 ms | 580 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
constexpr int mod = 1e9 + 7, inf = LONG_LONG_MAX;
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
int s = 0;
vector<int> a(n);
for (int &i: a) cin >> i;
for (int i = 1; i <= n; i++) {
int x = a[i - 1] * i;
cout << (x - s) << ' ';
s += (x - s);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |