We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
head = float(raw_input())
mylist = [float(i) for i in raw_input().split()]
zero = sum(j == 0 for j in mylist)
ng = sum(j < 0 for j in mylist)
ps = sum(j > 0 for j in mylist)
print round(ps/head, 3)
print round(ng/head, 3)
print round(zero/head, 3)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →