题解 | #[NOIP2010]数字统计#
[NOIP2010]数字统计
http://www.nowcoder.com/practice/179d9754eeaf48a1b9a49dc1d438525a
L, R = map(int, input().split())
lis = []
for i in range(L, R + 1):
lis += list(str(i))
print(lis.count("2"))
[NOIP2010]数字统计
http://www.nowcoder.com/practice/179d9754eeaf48a1b9a49dc1d438525a
L, R = map(int, input().split())
lis = []
for i in range(L, R + 1):
lis += list(str(i))
print(lis.count("2"))
相关推荐