We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

- All Contests
- ProjectEuler+
- Project Euler #52: Permuted multiples

# Project Euler #52: Permuted multiples

# Project Euler #52: Permuted multiples

Contest ends in

_{This problem is a programming version of Problem 52 from projecteuler.net}

It can be seen that the number, , and its double, , contain exactly the same digits, but in a different order.

Given N, find all the positive integers, , such that contain the same digits.

**Input Format**

Input contains two integers and

**Constraints**

**Output Format**

Print all the multiple corresponding to the test case. If there are more than 1 print each of them in a new line.

**Note1:** It is guaranteed a solution exists.

**Note2:** You should not consider solution with leading 0's.

**Sample Input**

```
125875 2
```

**Sample Output**

```
125874 251748
```