mirror of
https://github.com/Oxbian/CodingGame.git
synced 2025-06-15 09:58:01 +02:00
10 lines
212 B
Python
10 lines
212 B
Python
n = int(input())
|
|
max = 0
|
|
max_lost = 0
|
|
for i in input().split():
|
|
curr_lost = int(i) - max
|
|
if (curr_lost < max_lost):
|
|
max_lost = curr_lost
|
|
if (int(i) > max):
|
|
max = int(i)
|
|
print(max_lost) |