大家看看我的为什么是错的

P1179 [NOIP2010 普及组] 数字统计

虽然没看出您哪里错了,python给您提供的功能可不会那么麻烦啊 ```python a, b = map(int, input().split()) print(sum(str(i).count('2') for i in range(a, b+1))) ``` 这样就搞定了,虽然我运行了一下你的,感觉答案没什么区别
by CodePhoenix @ 2023-02-13 17:46:03


|