Advertisement
nikol_bratkova

Untitled

Apr 24th, 2022
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a, b = int(input()), int(input())
  2.  
  3.  
  4. is_good_number = True
  5. count = 0
  6. for number in range(a, b+1):
  7.  
  8. for i in range(len(str(number))):
  9. digit = str(number)[i]
  10. if digit == '0' or number % int(digit) == 0:
  11. is_good_number = True
  12. elif number % int(digit) != 0:
  13. is_good_number = False
  14. break
  15.  
  16. if is_good_number:
  17. count += 1
  18.  
  19. print(count)
Advertisement
RAW Paste Data Copied
Advertisement