# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
335628 | Joshc | Prosjek (COCI14_prosjek) | Cpython 3 | 19 ms | 2924 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.
n = int(input())
num = input().split()
o = 0
for i in range(n - 1):
a = (int(num[i]) * (i + 1)) - o
o += a
print(a, end = ' ')
print((int(num[-1]) * n) - o)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |