Submission #90709

#TimeUsernameProblemLanguageResultExecution timeMemory
90709AntonioDakiProsjek (COCI14_prosjek)C++14
50 / 50
2 ms904 KiB
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m; long long a[102], b[102]; cin >> n; for(int i = 0; i < n; ++i){ cin >> b[i]; m = b[i] * (i + 1); for(int j = i - 1; j >= 0; --j) m -= a[j]; a[i] = m; cout << m << ' '; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...