题解 | #记负均正#
记负均正
https://www.nowcoder.com/practice/6abde6ffcc354ea1a8333836bd6876b8
import sys num = int(input().strip()) uppernum,lowernum = [],[] for line in sys.stdin: a = list(map(int,line.strip().split(" "))) for i in a: if i>0: uppernum.append(i) elif i<0: lowernum.append(i) if uppernum: re = round(sum(uppernum)/len(uppernum),1) print(len(lowernum),re) else: print(len(lowernum),0.0)