不知道为什么错了,请大佬纠一下错,谢谢!
查看原帖
不知道为什么错了,请大佬纠一下错,谢谢!
606332
iberry楼主2021/11/26 20:26

n,x=map(int,input().split())

count=0

b=0

for i in range(1,n+1):

while i>=1:
    b=i%10
    i/=10
    if b==x:
        count+=1

print(count)

2021/11/26 20:26
加载中...