Fascinating Number in Java
Multiplying a number by two and three separately, the number obtained by writing the results obtained with the given number will be called a fascinating number. If the result obtained after concatenation contains all digits from 1 to 9, exactly once.
In other words, we can also say that a number (n) may be a fascinating number if it satisfies the following two conditions:
- If the given number is a 3 or more than three-digit
- If the value getting after concatenation contains all digits from 1 to 9, exactly once.
For example, 192, 1920, 2019, 327, etc. Let’s understand the concept of fascinating numbers through an example.
[mai mult...]