# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
485816 | groupATSU | Prosjek (COCI14_prosjek) | C++14 | 1 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf=1e9;
const int maxn=100;
const ll mod=998244353;
int dp[maxn][maxn];
void solve(){
int a;
cin>>a;
vector <int> b(a+1);
for(int i=1;i<=a;i++){
cin>>b[i];
}
int last=0;
for(int i=1;i<=a;i++){
int x=i*b[i]-last;
last+=x;
cout<<x<<" ";
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t=1;
//cin>>t;
while(t--){
solve();
cout<<'\n';
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |