제출 #1332019

#제출 시각아이디문제언어결과실행 시간메모리
1332019kawhietProsjek (COCI14_prosjek)C++20
50 / 50
1 ms344 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 timeMemoryGrader output
Fetching results...