题解 | #记负均正II#
记负均正II
http://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62
import sys
inpstr = [int(line) for line in sys.stdin]
a = 0
b = 0
c = 0
for i in inpstr:
if i < 0:
a += 1 # 判断负数个数
else:
b += i # 0,正数总和
c += 1
print(a)
if b == 0: # 0不能作为分母
print(0.0)
else:
print("%.1f" % (b/c))