Submission #51547

#TimeUsernameProblemLanguageResultExecution timeMemory
51547tranxuanbach평균 (COCI14_prosjek)C++17
50 / 50
3 ms700 KiB
#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    int n;
    cin >> n;
    int a[n + 1], b[n + 1];
    b[0] = 0;
    for (int i = 1; i <= n; i++){
        cin >> a[i];
        b[i] = a[i] * i;
        cout << b[i] - b[i - 1] << " ";
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...