Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_div(num):
- divs = [[q, num // q] for q in range(1, int(num ** 0.5) + 1) if num % q == 0]
- divs = sum(divs, [])
- return sorted(set(divs))
- a = 985_001
- true_nums = []
- while len(true_nums) < 6:
- divs = get_div(a)
- if sum(divs) % 10 == 7:
- true_nums.append((a, sum(divs)))
- a += 1
- for num in true_nums:
- print(*num)
Add Comment
Please, Sign In to add comment