# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1220516 | AlgorithmWarrior | 평균 (COCI14_prosjek) | C++20 | 1 ms | 468 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
int i;
long long sum=0;
for(i=1;i<=n;++i){
int a,b;
cin>>b;
a=1LL*i*b-sum;
cout<<a<<' ';
sum+=a;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |