Submission #446963

# Submission time Handle Problem Language Result Execution time Memory
446963 2021-07-24T05:46:21 Z dz001 Prosjek (COCI14_prosjek) C++11
50 / 50
1 ms 292 KB
#include <bits/stdc++.h>
 
using namespace std;
 
#define pb push_back
#define fi first
#define se second
#define MOD 1000000007
 
typedef long long ll;

int n;

signed main(){
	cin>>n;
	ll cur=1,tot=0;
	for(int i=0;i<n;++i){
		ll x; cin>>x;
		cout<<x*cur-tot<<' ';
		tot+=(x*cur-tot);cur++;
	}
	
#ifdef LOCAL
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s.";
#endif
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 292 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 284 KB Output is correct