题解 | #记负均正II#
记负均正II
http://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62
这也不难啊
num_list = [] while 1: try: a = int(input()) num_list.append(a) except: break count = 0 postive = [] for i in num_list: if i < 0: count += 1 elif i > 0: postive.append(i) print(count) if len(postive) == 0: print(0.0) else: print(round(sum(postive)/len(postive) , 1))