Problem #52
Difficulty: 5%
Permuted Multiples
Solution Language: Java
Problem Statement
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.
Approach
The solution involves:
- Iterating through positive integers starting from 1
- For each number, computing its multiples 2x, 3x, 4x, 5x, and 6x
- Checking if all six numbers contain the same digits
- Sorting digits or using digit frequency to compare
- Returning the first number that satisfies the property