답안 #268328

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
268328 2020-08-16T11:10:49 Z mayhoubsaleh 평균 (COCI14_prosjek) C++14
50 / 50
1 ms 396 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);


using namespace std;
const ll maxn=5e5+100;
const ll inf=1e9+10;

ll n;
ll a[maxn];
int main()
{
    IOS
    cin>>n;
    for(ll i=0;i<n;i++)cin>>a[i];

    for(ll i=0;i<n;i++){
        a[i]=a[i]*(i+1);
        if(i)cout<<a[i]-a[i-1]<<' ';
        else cout<<a[i]<<' ';
    }
    cout<<endl;
    return 0;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 396 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 1 ms 392 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 1 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct