제출 #397451

#제출 시각아이디문제언어결과실행 시간메모리
397451AlmaProsjek (COCI14_prosjek)C++17
50 / 50
1 ms320 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n; cin >> n;
    vector<int> a(n), b(n);
    for (int i = 0; i < n; i++) cin >> b[i];
    int suma = 0;
    for (int i = 0; i < n; i++) {
        a[i] = b[i]*(i+1) - suma;
        suma += a[i];
    }
    for (int i = 0; i < n; i++) cout << a[i] << ' ';
    cout << '\n';
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...