Back to Problem Solutions forum
I'm using python but I'm having issues with the result. This "should" be right, but I'm not getting the median of each and every sequence (It's hit or miss). Any thoughts?
import statistics
count = input()
answer = []
for i in range(int(count)):
a, b, c = input().split()
mid = statistics.median([a, b, c])
answer.append(mid)
print(*answer, sep=' ')
Edit* Median of 3