题解 | #筛选法求素数#
[NOIP2018]标题统计
http://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
思路:
- 用string的replace方法去掉空格和换行符
- 用len函数统计字符串长度
print(len(input().replace(" ","").replace("\n","")))
[NOIP2018]标题统计
http://www.nowcoder.com/practice/b14b87bc6a4547a6839e0a5867c98dba
print(len(input().replace(" ","").replace("\n","")))
相关推荐