#P6124. [NEERC 2015] Binary vs Decimal
[NEERC 2015] Binary vs Decimal
Description
A positive number is considered valid if it contains only 0 or 1, and after converting it to binary as , is a suffix of .
Now you are given a number . Find the -th such number.
Input Format
One line with one number .
Output Format
One line with one number: the -th number.
2
10
10
1100
Hint
.
| Original | Binary | Comment |
|---|---|---|
| √ | ||
| × | ||
| √ | ||
Translated by ChatGPT 5
京公网安备 11011102002149号