Submission #86265

#TimeUsernameProblemLanguageResultExecution timeMemory
86265MohamedAhmed0Prosjek (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...