# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20229 | leporem91 | Prosjek (COCI14_prosjek) | C++98 | 2 ms | 0 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 <stdio.h>
#include <algorithm>
using namespace std;
#define MAXN 105
int N;
int main(void)
{
scanf("%d", &N);
long long sum = 0;
for (long long i = 1; i <= N; i++)
{
long long n; scanf("%lld", &n);
long long v = n*i-sum;
printf("%lld ", v);
sum += v;
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |