题解 | #记负均正#

记负均正

https://www.nowcoder.com/practice/6abde6ffcc354ea1a8333836bd6876b8

n = int(input())
ls = list(map(int,input().split()))
ls1 = []
ls2 = []
for i in ls:
    if i == 0:
        continue
    elif i > 0:
        ls1.append(i)
    elif i < 0:
        ls2.append(i)
if len(ls1) != 0:
    print((len(ls2)),round(sum(ls1)/len(ls1),1))
else:
    print(len(ls2),0.0)

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-02 18:35
简历上把1个月实习写成了3个月,会进行背调吗?
码农索隆:一个月有一个月的实习经历,三个月有三个月的实习经历
点赞 评论 收藏
分享
05-14 20:34
门头沟学院 Java
窝补药贝八股:管他们,乱说,反正又不去,直接说680
点赞 评论 收藏
分享
仁者伍敌:牛子这些人还会点一个自动回复,boss都不带回复的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务