Submission #339041

#TimeUsernameProblemLanguageResultExecution timeMemory
339041ammar2000Prosjek (COCI14_prosjek)C++17
50 / 50
1 ms364 KiB
#include <bits/stdc++.h> using namespace std; int n,a[120],b[120]; int main() { a[0]=0; cin>>n; for (int i=1;i<=n;i++) cin>>b[i]; for (int i=1;i<=n;i++) b[i]*=i; for (int i=n;i;i--) a[i]=b[i]-b[i-1]; for (int i=1;i<=n;i++) cout <<a[i]<<" "; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...