def check(x):
while x > 0:
k = x % 10
x //= 10
if k % 2 == 0:
return False
return True
m, n = map(int, input().split())
cnt = 0
while m <= n:
if check(m):
cnt += 1
m += 1
print(cnt)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
def check(x):
while x > 0:
k = x % 10
x //= 10
if k % 2 == 0:
return False
return True
m, n = map(int, input().split())
cnt = 0
while m <= n:
if check(m):
cnt += 1
m += 1
print(cnt)