Problem 53 Description There are exactly ten ways of selecting three from five, 12345: 123, 124, 125, 134, 135, 145, 234, 235, 245, and 345 In combinatorics, we use the notation, . In general, , where , , and . It is not until
Problem 52
Description It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.
Solution 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def solution(): for i in range(1, 1000000): a = str(i * 2) b = str(i * 3) c = str(i * 4) d = str(i * 5) e = str(i * 6) if ( sorted(a) == sorted(b) and sorted(a) == sorted(c) and sorted(a) == sorted(d) and sorted(a) == sorted(e) ): return i Summary It limit the number range to one billion.