# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
483912 | ktkerem | Prosjek (COCI14_prosjek) | C++17 | 1 ms | 308 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;
typedef long long ll;
typedef unsigned long long ull;
ll _i=0;
#define ffn(x) _i=x
#define fora(y,x) for(ll y=_i;x>y;y++)
#define pb push_back
#define pf push_front
#define debu cout << "hello\n"
#define fi first
#define sec second
const ll limit =1000000007;
const ll ous=150005;
void solve(){
ll n;
cin >> n;
ll ar[n];
fora(i,n){
cin >> ar[i];
}
ll sum = ar[0] , d = 2;
cout << ar[0] << " ";
ffn(1);
fora(i,n){
cout << d*ar[i]-sum << " ";
sum=d*ar[i];
d++;
}
ffn(0);
return;
}
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
ll t=1;
//cin >> t;
while(t--){
solve();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |