题解 | #记负均正#
记负均正
http://www.nowcoder.com/practice/6abde6ffcc354ea1a8333836bd6876b8
import sys
a, b = sys.stdin.readlines()
up = [int(i.strip()) for i in b.split(' ') if int(i) > 0]
down = [int(i.strip()) for i in b.split(' ') if int(i) < 0]
if len(up) > 0:
print(len(down), '%.1f'%(sum(up)/len(up)), end='')
else:
print(len(down), 0.0)
a, b = sys.stdin.readlines()
up = [int(i.strip()) for i in b.split(' ') if int(i) > 0]
down = [int(i.strip()) for i in b.split(' ') if int(i) < 0]
if len(up) > 0:
print(len(down), '%.1f'%(sum(up)/len(up)), end='')
else:
print(len(down), 0.0)