while True: try: num = int(input()) inputint = list(map(int,input().split())) L = [] L1 = [] for i in inputint: if i < 0: L.append(i) elif i > 0: L1.append(i) if len(L1) == 0: print(0,0.0) else: print(len(L),'%.1f'%(sum(L1)/len(L1))) except: break
1

相关推荐

牛客网
牛客企业服务