제출 #1215694

#제출 시각아이디문제언어결과실행 시간메모리
1215694Robert_juniorProsjek (COCI14_prosjek)C++20
50 / 50
0 ms328 KiB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
#define ins insert
#define pb push_back
#define F first
#define S second
const int N = 1e6 + 7, M = 5e5 + 7;
const int mod = 1e9 + 7;
void solve(){
    int n;
    cin>>n;
    int a[n + 1], b[n + 1];
    int cur = 0;
    for(int i = 1; i <= n; i++){
        cin>>a[i];
        b[i] = a[i] * i - cur;
        cur += b[i];
        cout<<b[i]<<' ';
    }
}
signed main(){
    ios_base :: sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin>>t; 
    for(int i = 1; i <= t; i++){
        //cout<<"Case "<<i<<": ";
        solve();
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...