Sunday Times Teaser 2696 – Digital Display
by Danny Roth
A phone number has seven different digits in decreasing order.
The digits in the sum of its digits do not occur in the number itself.
Moreover, the number is a multiple of this sum.
What is the number?
One Comment
Leave one →
-
brian gladman permalink12345678910from itertools import combinationsfor digits in combinations('9876543210', 7):phone_number = int(''.join(digits))sum_digits = sum(int(x) for x in digits)if not phone_number % sum_digits:if not set(digits) & set(str(sum_digits)):print(phone_number)