제출 #1306660

#제출 시각아이디문제언어결과실행 시간메모리
1306660tab평균 (COCI14_prosjek)C++20
50 / 50
1 ms720 KiB
#include "bits/stdc++.h" using namespace std; #define intt long long #define fi first #define se second #define endl "\n" const intt mxN = 2e5+67; const intt LG = 31; const intt inf = 1e18; const intt mod = 1e9 + 7; void smile() { intt n, sum = 0; cin >> n; vector<intt> a(n), ans(n); for(intt i = 0; i < n; i++){ cin >> a[i]; } ans[0] = sum = a[0]; for(intt i = 1; i < n; i++) { intt k = a[i] * (i + 1); ans[i] = k - sum; sum = k; } for(intt i = 0; i < n; i++) { cout << ans[i] << " "; } cout << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); // freopen("island.in", "r", stdin); // freopen("island.out", "w", stdout); intt t = 1, buu = 1; // cin >> t; while(t--){ // cout << "Case #" << buu++ << ": "; smile(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...