제출 #1197223

#제출 시각아이디문제언어결과실행 시간메모리
1197223primo평균 (COCI14_prosjek)C++20
50 / 50
0 ms328 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(nullptr); int n; cin >> n; vector<int> b(n); for (int i = 0; i < n; ++i) { cin >> b[i]; } vector<int> a(n); a[0] = b[0]; for (int i = 1; i < n; ++i) { a[i] = (i + 1) * b[i]; for (int j = 0; j < i; ++j) { a[i] -= a[j]; } } for (int i = 0; i < n; ++i) { cout << a[i] << " \n"[i == n - 1]; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...