제출 #163211

#제출 시각아이디문제언어결과실행 시간메모리
163211beso123평균 (COCI14_prosjek)C++14
50 / 50
2 ms384 KiB
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,a[105];
main(){
cin>>n;
for(int k=1;k<=n;k++)
    cin>>a[k];
int sum=a[1];
cout<<a[1]<<' ';
for(int k=2;k<=n;k++){
    int h=a[k]*k-sum;
    sum+=h;
    cout<<h<<' ';
}
return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

prosjek.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...