Submission #398712

#TimeUsernameProblemLanguageResultExecution timeMemory
398712AlexandraProsjek (COCI14_prosjek)C++14
50 / 50
1 ms316 KiB
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; vector<int> b; vector<int> a; cin >> n; for (int i=0; i<n; i++) { int c; cin >> c; b.push_back(c); } a.push_back(b[0]); int media=a[0]; for (int nums=1; nums<n; nums++) { a.push_back(b[nums]*(nums+1)-media); media += a[nums]; } for (int i=0; i<n; i++) { cout << a[i]; if (i!=(n-1)) { cout << " "; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...