#C2610. Maximum Guesses Needed in Binary Search

    ID: 45946 Type: Default 1000ms 256MiB

Maximum Guesses Needed in Binary Search

Given two integers low and high, determine the maximum number of guesses needed to identify a secret number within the inclusive range [low, high] using a binary search strategy. The answer can be computed as \(\lceil \log_2(\text{high} - \text{low} + 1)\rceil\).

For instance, when the range is [1, 100], the maximum number of guesses required is 7 since \(\lceil \log_2(100)\rceil = 7\).

inputFormat

The input consists of two space-separated integers low and high (with low ≤ high), representing the inclusive range in which the secret number lies.

outputFormat

Output a single integer: the maximum number of guesses required using a binary search strategy, computed as \(\lceil \log_2(\text{high} - \text{low} + 1)\rceil\).

## sample
1 100
7