题解 | #记负均正II#

记负均正II

https://www.nowcoder.com/practice/64f6f222499c4c94b338e588592b6a62

'''
a=[]
while True:
    try:
        b,c,d= [int(x) for x in input().split()]
        print(b,c,d)
    except:
        break
 
'''
a=[]
b=[]
c=[]
sum=0
while True:
    try:
    
        a.append(int(input())) 
    except EOFError:
        for i in a:
            if i>=0:
                b.append(i)
            else:
                c.append(i)
        print(len(c))
        for i in b:
            sum=sum+i
        if len(b)>0:
            print(round(sum/len(b),1))
        else:
            print(0.0)
        break
        
        
        
        
        
全部评论

相关推荐

许愿ssp的咸鱼很不想泡池子:import python as pyhton
点赞 评论 收藏
分享
数开小菜鸡:你是我今早见过的最美的牛客女孩......
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务