1
0
mirror of https://github.com/Oxbian/CodingGame.git synced 2025-07-06 20:05:27 +02:00
Files
CodingGame/Python/Easy_Challenges/temperatures.py
2022-03-13 19:40:00 +01:00

20 lines
411 B
Python

import sys
import math
n = int(input()) # the number of temperatures to analyse
min = float('inf')
for i in input().split():
# t: a temperature expressed as an integer ranging from -273 to 5526
t = int(i)
if (abs(0-t) < abs(0-min)):
min = t
elif min == t:
min = t
elif abs(min) == abs(t):
min = abs(min)
if (min == float('inf')):
print(0)
else:
print(min)