Problem 52
It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
数字125874和125874*2(251748)一样,拥有相同的、不同序的数字。
Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.
找到最小的正整数x,使得2x, 3x, 4x, 5x, 6x拥有相同的数字。
multi = 6
for x in range(1, 999999):
nums = []
flag = True
for y in range(1, multi+1):
num = x * y
nums.append(num)
digits = sorted(str(nums[0]))
for num in nums:
if sorted(str(num)) != digits:
flag = False
if not flag:
continue
else:
print(nums, '/n', digits)
break