제출 #86265

#제출 시각아이디문제언어결과실행 시간메모리
86265MohamedAhmed0평균 (COCI14_prosjek)C++14
50 / 50
2 ms544 KiB
/* Author : Mohamed Ahmed Just solution will be average * index - (sum of elements before it) */ #include <bits/stdc++.h> using namespace std; int main() { int n ; cin>>n ; long long sum = 0 ; for(int i = 1 ; i <= n ; ++i) { long long x ; cin>>x ; long long a = x * (i*1ll) - sum ; cout<<a<<" "; sum += a ; } }
#Verdict Execution timeMemoryGrader output
Fetching results...