Company: unify apps
Difficulty: medium
Smallest Power of Two From Digits You are given the decimal representation of a positive integer `N`. You may delete zero or more digits and rearrange the remaining digits. Print the smallest positive power of two that can be formed exactly from the retained digits, without a leading zero. Print `-1` if none can be formed. Input Format One line containing `N` (1 to 18 decimal digits). Output Format Print the required power of two or `-1`. Example Input: `460` Output: `64` The digits `6` and `4` can be retained and rearranged to form `64`. Notes `1` is treated as `2^0`. The deletion permission is an explicit reconstruction: the submitted example `460 → 64` cannot otherwise be satisfied.