题解 | #记负均正#

记负均正

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

    try:
        n = int(input())
        z_s = []
        f_s = []
        for i in input().split():
            int(i) < 0 and f_s.append(int(i))
            int(i) > 0 and z_s.append(int(i))
        print(f"%s %0.1f" % (len(f_s), 0 if not len(z_s) else sum(z_s)/len(z_s)) )
    except:
        break
全部评论

相关推荐

牛客868257804号:九个中铁八个中建
点赞 评论 收藏
分享
评论
2
1
分享
牛客网
牛客企业服务