题解 | #记负均正#
记负均正
https://www.nowcoder.com/practice/6abde6ffcc354ea1a8333836bd6876b8
n = int(input()) li = list(map(int, input().split())) counter = 0 sum = 0 counter2 = 0 for i in li: if i < 0: counter += 1 elif i > 0: sum += i counter2 +=1 if counter2 != 0: # 0不能做分母 res = sum / counter2 else: res = 0 print(counter,f'{res:.1f}')