답안 #483912

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
483912 2021-11-01T10:34:20 Z ktkerem 평균 (COCI14_prosjek) C++17
50 / 50
1 ms 308 KB
#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ll _i=0;
#define ffn(x) _i=x
#define fora(y,x) for(ll y=_i;x>y;y++)
#define pb push_back
#define pf push_front
#define debu cout << "hello\n"
#define fi first
#define sec second
const ll limit =1000000007; 
const ll ous=150005;
void solve(){
    ll n;
    cin >> n;
    ll ar[n];
    fora(i,n){
        cin >> ar[i];
    }
    ll sum = ar[0] , d = 2;
    cout << ar[0] << " ";
    ffn(1);
    fora(i,n){
        cout << d*ar[i]-sum << " ";
        sum=d*ar[i];
        d++;
    }
    ffn(0);
    return;
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    ll t=1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0; 
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 308 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct