답안 #69391

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
69391 2018-08-20T18:24:06 Z bharat2002 평균 (COCI14_prosjek) C++14
50 / 50
4 ms 836 KB
/*input
5
1 2 2 3 4
*/
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define f first
#define s second
inline pii mp(int a, int b)
{
	pii temp;temp.f=a;temp.s=b;return temp;
}
int arr[101];
signed main()
{
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	int n;cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>arr[i];
	}	
	int cur=arr[1];cout<<cur<<" ";
	for(int i=2;i<=n;i++)
	{
		cout<<arr[i]*i - cur<<" ";cur=arr[i]*i;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 2 ms 480 KB Output is correct
3 Correct 2 ms 720 KB Output is correct
4 Correct 3 ms 720 KB Output is correct
5 Correct 4 ms 720 KB Output is correct
6 Correct 3 ms 832 KB Output is correct
7 Correct 2 ms 832 KB Output is correct
8 Correct 3 ms 832 KB Output is correct
9 Correct 2 ms 832 KB Output is correct
10 Correct 3 ms 836 KB Output is correct