我太无聊了
系统最多只能递龟997遍
def f(l,r,sum = 0):
count = str(l).count('2')
sum += count
if l == r:
return sum
return f(l + 1,r,sum = sum)
L,R = map(int,input().split())
print(f(L,R))