Submission #877854

#TimeUsernameProblemLanguageResultExecution timeMemory
877854slumioProsjek (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<<' '<<fixed<<a[i]; return; } int main() { solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...