답안 #942379

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
942379 2024-03-10T14:35:30 Z Blagoj 평균 (COCI14_prosjek) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define ll long long
#define all(x) (x).begin(), (x).end()

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll sum = 0;
    cin >> sum;
    cout << sum << " ";
    for (int i = 2; i <= n; i++) {
        ll x;
        cin >> x;
        cout << (x * i) - sum << " ";
        sum = x * i;       
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct