题解 | #[NOIP2018]标题统计#
[NOIP2018]标题统计
http://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
words = input()
num = len(words)
for i in words:
if i ==" " or i == "\n":
num -= 1
print(num)
!=会出现偏差,在判断条件时最好不要用!=
[NOIP2018]标题统计
http://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
words = input()
num = len(words)
for i in words:
if i ==" " or i == "\n":
num -= 1
print(num)
!=会出现偏差,在判断条件时最好不要用!=
相关推荐