Submission #76776

# Submission time Handle Problem Language Result Execution time Memory
76776 2018-09-17T17:45:13 Z dereotu Prosjek (COCI14_prosjek) C++17
0 / 50
2 ms 824 KB
#include <bits/stdc++.h>
#define endl '\n'
#define space ' '
#define st first
#define nd second
#define pb push_back
#define mp make_pair
#define ii pair <int,int>
#define iii pair < int,pair <int,int> >
#define vi vector <int>
#define vii vector < pair<int,int> >
#define forr(i,A,B) for(int i=A;i<B;++i)
#define input(file) freopen(file,"r",stdin)
#define output(file) freopen(file,"w",stdout)
using namespace std;

int n,a[105];

int main(){
	cin>>n;
	forr(i,0,n) cin>>a[i];
	long long total = a[0];
	cout<<a[0]<<space;
	forr(i,1,n){
		long long val = a[i] * (i+1);
		// cout<<"xd "<<val<<space<<total<<endl;
		cout<< (val - total) << space;
		total += (val - total);
	}	
	cout<<endl;

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 516 KB Output is correct
3 Correct 2 ms 516 KB Output is correct
4 Correct 2 ms 568 KB Output is correct
5 Correct 2 ms 568 KB Output is correct
6 Correct 2 ms 596 KB Output is correct
7 Correct 2 ms 816 KB Output is correct
8 Correct 2 ms 816 KB Output is correct
9 Incorrect 2 ms 824 KB Output isn't correct
10 Halted 0 ms 0 KB -