Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_lucky(number):
- _number_array = list(str(number))
- check_number = ''
- is_lucky = True
- while _number_array:
- _next_digit = _number_array.pop()
- check_number = _next_digit + check_number
- if int(check_number) % len(check_number) != 0:
- is_lucky = False
- return is_lucky
- count = 0
- for i in range(100, 999):
- if is_lucky(i):
- count += 1
- print count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement