# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1264446 | sohamsen15 | 평균 (COCI14_prosjek) | C++20 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n; cin >> n;
vector<ll> a(n + 1), b(n + 1);
for (ll i = 1; i <= n; i++) cin >> b[i]; a[1] = b[1];
for (ll i = 2; i <= n; i++) a[i] = i * b[i] - (i - 1) * b[i - 1];
for (ll i = 1; i <= n; i++) cout << a[i] << " ";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |