본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 9723번 Digit Count

by 현장 2022. 10. 17.

start, end, n = map(int, input().split())
n = str(n)
cnt = 0
for i in range(start, end + 1):
    i = str(i)
    if n in i:
        cnt += i.count(n)
print(cnt)