题解 | #记负均正II#
记负均正II
https://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62
比上一道多了个0
s = 0 avr = 0.0 m = [] n = [] while True: try: n.append(int(input())) except: for i in n: if i < 0: s += 1 else: m.append(i) print(s) if m: avr = round(sum(m)/len(m), 1) print(avr) break