| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1332019 | kawhiet | 평균 (COCI14_prosjek) | C++20 | 1 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> b(n);
for (int i = 0; i < n; i++) {
cin >> b[i];
}
vector<long long> p(n);
for (int i = 0; i < n; i++) {
p[i] = 1LL * (i + 1) * b[i];
}
vector<int> a(n);
a[0] = p[0];
for (int i = 1; i < n; i++) {
a[i] = p[i] - p[i - 1];
}
for (int i = 0; i < n; i++) {
cout << a[i] << ' ';
}
cout << '\n';
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
