5行python代码解CSP小中大

CSP小中大201903-1_python

N = eval(input())
numbers = list(map(int, input().split()))
middle = (numbers[(N-1)//2]+numbers[N//2]) / 2
middle = int(middle) if middle == int(middle) else round(middle, 1)
print(max(numbers), middle, min(numbers))

CSP小中大201903-1_python_02