Japt, 15 bytes
LÆ*2pXÃbì_â Ê¥A
Try it
Explanation
Implicit input of integer U
.
LÆ Ã
Create an array of integers from 0
to 99
and pass each through a function where X
is the current element.
*2pX
U
multiplied by 2 raised to the power of X
.
b
Get the index of the first element thay returns true when passed through the following function.
ì_â
Split to an array of digits and remove the duplicates.
Ê¥A
Get the length of the array and check for equality with 10
.
Alternative, 15 bytes
@*2pX)ìâ sÊ¥A}a
Try it
Explanation
Implicit input of integer U
.
@ }a
Starting with 0
, return the first number that returns true when passed through the following function, with X
being the current number.
*2pX)
As above, multiply U
by 2 to the power of X
.
ìâ
Split to an array of digits, remove duplicates and rejoin to an integer.
sÊ
Convert to a string, get the length and convert back to an integer.
¥A
Check for equality with 10
.