题解 | #记负均正II#
记负均正II
http://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62
import sys f_count = 0 ff_count = 0 ff_sum = 0 while True: try: c = int(input()) if c < 0: f_count += 1 else: ff_count += 1 ff_sum += c except: break print(f_count) if ff_count == 0: print("0.0") else: print(f"{ff_sum/ff_count:0.1f}")