Submission #397451

#TimeUsernameProblemLanguageResultExecution timeMemory
397451AlmaProsjek (COCI14_prosjek)C++17
50 / 50
1 ms320 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; vector<int> a(n), b(n); for (int i = 0; i < n; i++) cin >> b[i]; int suma = 0; for (int i = 0; i < n; i++) { a[i] = b[i]*(i+1) - suma; suma += a[i]; } for (int i = 0; i < n; i++) cout << a[i] << ' '; cout << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...