답안 #339812

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
339812 2020-12-26T09:12:05 Z shivam_327 평균 (COCI14_prosjek) C++14
50 / 50
1 ms 364 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define vi vector<int>
#define vll vector<ll>
#define vii vector<pair<int,int>>
#define vlll vector<pair<ll,ll>>
#define all(x) x.begin(),x.end()
#define TESTCASES ll t;cin>>t;while(t--)
using namespace std;
int main()
{
	ll n;cin>>n;
	vll b(n+1);for(ll i=1;i<=n;i++){cin>>b[i];}
	vll a(n+1);a[1]=b[1];
	for(ll i=2;i<=n;i++){a[i]=i*b[i]-(i-1)*b[i-1];}
	for(ll i=1;i<=n;i++){cout<<a[i]<<" ";}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct