Output Format
Print lines of output in the following order:
- Print the mean on a new line, to a scale of decimal place (i.e., , ).
- Print the median on a new line, to a scale of decimal place (i.e., , ).
- Print the mode on a new line; if more than one such value exists, print the numerically smallest one.
Sample Input
10
64630 11735 14216 99233 14470 4978 73429 38120 51135 67060
Sample Output
43900.6
44627.5
4978
size=int(input())
data=list(map(int,str(input()).split(' ')))
meanvalue=sum(data)/size
print(round(meanvalue,1))
data=sorted(data)#######
if size%2==0:
median=(data[size//2]+data[size//2-1])/2
else:
median=data[size//2]
print(round(median,1))
maxcount=0
for ele in data:
count=data.count(ele)#######
if count>maxcount:
maxcount=count
mode=ele
print(mode)