답안 #485816

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
485816 2021-11-09T12:51:39 Z groupATSU 평균 (COCI14_prosjek) C++14
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf=1e9;
const int maxn=100;
const ll mod=998244353;
int dp[maxn][maxn];
void solve(){
	int a;
	cin>>a;
	vector <int> b(a+1);
	for(int i=1;i<=a;i++){
		cin>>b[i];
	}
	int last=0;
	for(int i=1;i<=a;i++){
		int x=i*b[i]-last;
		last+=x;
		cout<<x<<" ";
	}
}

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
   	//cin>>t;
    while(t--){
        solve();
        cout<<'\n';
    }


}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 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 1 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 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct