Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def unique(s):
- return len(set(s)) == len(s)
- answers = []
- for a in range(1000000):
- print(a)
- if not unique(str(a)):
- continue
- else:
- for b in range(2, int(a**0.5)+1):
- if a % b == 0:
- if unique(str(a) + str(b) + str(int(a/b))) and (len(str(a) + str(b) + str(int(a/b))) == 9) and ("0" not in (str(a) + str(b) + str(int(a/b)))):
- if a not in answers:
- answers.append(a)
- total = 0
- for c in answers:
- total += c
- print(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement