제출 #877851

#제출 시각아이디문제언어결과실행 시간메모리
877851slumio평균 (COCI14_prosjek)C++17
0 / 50
0 ms348 KiB
#include<bits/stdc++.h> using namespace std; using ll=long long; using ull=unsigned long long; void solve(){ ll n; cin>>n; ll m; int ans=0; vector<ll>a; for(ll i=1;i<=n;i++) { cin>>m; a.push_back(i*m-ans); ans+=a[a.size()-1]; } int p=a.size(); cout<<a[0]; for(int i=1;i<p;i++)cout<<' '<<a[i]; return; } int main() { solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...