# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
335628 |
2020-12-13T11:25:55 Z |
Joshc |
Prosjek (COCI14_prosjek) |
Python 3 |
|
19 ms |
2924 KB |
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 |
1 |
Correct |
16 ms |
2796 KB |
Output is correct |
2 |
Correct |
16 ms |
2796 KB |
Output is correct |
3 |
Correct |
16 ms |
2792 KB |
Output is correct |
4 |
Correct |
17 ms |
2796 KB |
Output is correct |
5 |
Correct |
17 ms |
2796 KB |
Output is correct |
6 |
Correct |
16 ms |
2816 KB |
Output is correct |
7 |
Correct |
17 ms |
2924 KB |
Output is correct |
8 |
Correct |
17 ms |
2796 KB |
Output is correct |
9 |
Correct |
16 ms |
2796 KB |
Output is correct |
10 |
Correct |
19 ms |
2796 KB |
Output is correct |