Temukan median nomor input dalam daftar dan cetak

import statistics
array = []
n = int(input())
for _ in range(n):
    array.append(int(input()))
print (int(statistics.median(array)))
Poor Pigeon