#P16224. [蓝桥杯 2026 省 A] 均衡数
[蓝桥杯 2026 省 A] 均衡数
Problem Description
If the binary representation (without leading ) of a positive integer has the same number of 's and 's, then we call it a "balanced number".
Now, please find a balanced number that makes as small as possible. If there are multiple balanced numbers with the same minimum value of , choose the smallest one among them.
Output Format
This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The answer to this problem is an integer. When submitting, only fill in this integer; any extra content will make you score .
Hint
Translated by ChatGPT 5