Submission #650262

# Submission time Handle Problem Language Result Execution time Memory
650262 2022-10-13T09:25:38 Z Codula Prosjek (COCI14_prosjek) C++17
50 / 50
1 ms 324 KB
//IOI 2023 I am coming.
 
#include "bits/stdc++.h"
 
using namespace std;
 
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define int int64_t
#define pb push_back
#define deb(x) cerr<<"("<<#x<<"="<<x<<','<<__LINE__<<")"<<endl; 
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); 
 
int32_t main(){
	fast;
	int n;
	cin>>n;
	vector<int>a(n);
	for(int i=0;i<n;++i){
		cin>>a[i];
	}
	vector<int>pref(n+1);
	for(int i=0;i<n;++i){
		pref[i+1]=a[i]*(i+1);
	}
	for(int i=0;i<n;++i){
		cout<<pref[i+1]-pref[i]<<" ";
	}
	cout<<"\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 320 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 324 KB Output is correct
10 Correct 1 ms 212 KB Output is correct