# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146202 | Fasho | Prosjek (COCI14_prosjek) | C++14 | 2 ms | 376 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>
#define N 1000005
#define ll long long int
#define MP make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll,ll>
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false)
#define fast2 freopen ("kmp.in","r",stdin);freopen ("kmp.out","w",stdout);
#define mod 1000000009
#define fs(x,y) for(int i=1;i<=y;i++) cin>>x[i]
#define fo(i,x,y) for(int i=x;i<=y;i++)
#define INF 1000000000005
using namespace std;
ll n,m,ar[N],sum;
int main()
{
fast;
cin>>n;
fo(i,1,n)
{
cin>>ar[i];
cout<<i*ar[i]-(i-1)*ar[i-1]<<sp;
}
}
/* cd onedrive\desktop\kod
cls
*/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |