题解 | #记负均正II#
记负均正II
https://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62
lista = [] fu_list = [] slist = [] while True: try: lista.append(int(input())) except: break counts = 0 s = 0 p = 0 for i in lista: # print(i) if i < 0: counts += 1 else: s += i p += 1 print(counts) if p == 0: print("0.0") else: print('{0:.1f}'.format(float(s / p)))