제출 #448706

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

#define ll long long 
#define ar array

const int mxN = 1e5, M = 1e9+7;  

int main(){  
#ifdef _DEBUG
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
#endif  
    std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0);

    int n; 
    cin >> n; 
    vector<int> b(n), ans(n);
    ll sum = 0; 
    for(int i = 0; i<n; ++i){
        cin >> b[i];
    }
    for(int i = 0; i<n; ++i){
        ans[i] = b[i]*(i+1)-sum;
        sum += ans[i];
    }

    for(int i = 0; i<n; ++i){
        cout << ans[i] << " ";
    }
}   
#Verdict Execution timeMemoryGrader output
Fetching results...