题解 | #记负均正#暴力求解,没啥可说的
记负均正
http://www.nowcoder.com/practice/6abde6ffcc354ea1a8333836bd6876b8
a=int(input())
b=input().split(' ')
b=list(map(int,b))
c=[]
d=0
for i in range(a):
if b[i]>0:
c.append(b[i])
elif b[i]<0:
d=d+1
if c==[]:
print(d,0.0)
else:
print(d,round(sum(c)/len(c),1))
b=input().split(' ')
b=list(map(int,b))
c=[]
d=0
for i in range(a):
if b[i]>0:
c.append(b[i])
elif b[i]<0:
d=d+1
if c==[]:
print(d,0.0)
else:
print(d,round(sum(c)/len(c),1))