temperatureWrite a program that prints the temperature closest to 0 among input data. If two numbers are equally close to zero, positive integer has to be considered closest to zero (for instance, if the temperatures are -5 and 5, then display 5).


import sys

import math

n = input()

tempsInput = input().split()

temps = [int(x) for x in tempsInput]

temps_abs = [abs(int(x)) for x in tempsInput]

if not tempsInput:



minT = min(temps_abs)

maxT = max(temps)

result = minT if (minT and maxT > 0) else maxT