inp = input().split() count = 0 for i in [char for char in str(list(range(1,int(inp[0])+1))).replace("[","").replace("]","").replace(",","").replace(" ","")]: if int(i) == int(inp[1]): count = count + 1 print(count)
有什么问题?TLE了!