题解 | #错误出现的次数#
错误出现的次数
https://www.nowcoder.com/practice/01da65ec58f84fba93611aae4735f68b
# 注意输入的是字符串类型,匹配也要是字符串 total = input().split() count = 0 for i in total: if i == '1': count = count elif i == '0': count += 1 print(count)
错误出现的次数
https://www.nowcoder.com/practice/01da65ec58f84fba93611aae4735f68b
# 注意输入的是字符串类型,匹配也要是字符串 total = input().split() count = 0 for i in total: if i == '1': count = count elif i == '0': count += 1 print(count)
相关推荐