题解 | #错误出现的次数#

错误出现的次数

https://www.nowcoder.com/practice/01da65ec58f84fba93611aae4735f68b

#方法一
# ls1 = list(map(int,input().split()))
# cnt = 0
# for i in ls1:
#     if i == 0:
#         cnt += 1
# print(cnt)
# #方法二
# ls1 = list(map(int,input().split()))
# print(ls1.count(0))
#方法三
from collections import Counter
ls1 = list(map(int,input().split()))
if 0 in ls1:
    print(dict(Counter(ls1))[0])
else:
    print(0)
全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

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