# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1271393 | hoangtien69 | Prosjek (COCI14_prosjek) | C++20 | 0 ms | 328 KiB |
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
#define int long long
int n;
int b[MAXN];
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> b[i];
}
cout << b[1] << " ";
for (int i = 2; i <= n; i++)
{
cout << b[i] * i - b[i - 1] * (i - 1) << " ";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |