题解 | #密码强度等级#

记负均正

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

while True:
    try:
        k = input()
        count_f = 0
        input_list = [i for i in map(int,input().split())]
        pos_list = []
        for i in input_list:
            if i < 0 :
                count_f += 1
            elif i > 0:
                pos_list.append(i)
        print('{} {:.1f}'.format(count_f,(sum(pos_list)/len(pos_list))))
    except:
        break
    
全部评论

相关推荐

06-12 10:50
门头沟学院 Java
你的不定积分没加C:我怎么在学院群看到了同样的话
点赞 评论 收藏
分享
重生我想学测开:嵌入式的问题,我准备入行京东外卖了
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

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