Adding python files

This commit is contained in:
Arkagedon
2022-03-13 19:40:00 +01:00
parent 96c71d1d71
commit 70f29fa19e
22 changed files with 320 additions and 32 deletions

View File

@ -0,0 +1,19 @@
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)