| Cataratas do Pinhão 2025 |
|---|
| Закончено |
The Binarical Garden is a famous tourist attraction in Curitibyte, known mainly for its greenhouse containing countless specimens of plants from Brazil and even other countries.
However, few tourists know that behind the greenhouse there is a gigantic garden of binary flowers positioned side by side. A binary flower located in the $$$i$$$-th position is so called because its number of petals is equal to the number of ones in the binary representation of $$$i$$$.
Dona Francisca is a curious tourist who is currently at position $$$L$$$ in the garden and wants to walk to position $$$R$$$ in order to find the largest number of petals on a binary flower in that part of the garden, including $$$L$$$ and $$$R$$$. Help Dona Francisca find this value.
The input consists of a single line containing two integers $$$L$$$ and $$$R$$$ ($$$1 \leq L \le R \leq 10^{18}$$$), the range of the garden that Dona Francisca will walk.
The output should contain only a single integer, the largest number of petals in the given range.
7 15
4
1 1000000000
29
| Название |
|---|


