Easy Query

Time: 1.0 s     Memory: 1024 MB
  • This problem is easy! You are given two integers $l$ and $r$ ($1 \leq l < r \leq 10^9$), and your task is to count how many numbers $x$ satisfy $l < x < r$. Did we forget to mention that $x$ can be any 32-bit floating point number as defined by the IEE 754 standard?

    Input

    The only input is the integers $l$ and $r$ ($1 \leq l < r \leq 10^9$).

    Output

    Print an integer: the number of 32-bit floats $x$ that satisfy $l < x < r$.

    Points

    If you correctly answer all testcases, you will earn 100 points.

    Explanation of sample 1

    All 8388607 32-bit floats between 1 and 2 be found here. Note that the floats 1 and 2 are excluded.

    Sample Input 1 Sample Output 1
    1 2
    
    8388607
    
    Sample Input 2 Sample Output 2
    99999999 1000000000
    
    28290823
    
    Sample Input 3 Sample Output 3
    42069133 742069420
    
    34631983
    
April fools 2024
You must log in to submit solutions to the problem.
{"contest_start_timestamp": 1711962000, "contest_duration": 7200, "contest_started": true, "contest_ended": true, "flexible_start_window_end_time": null, "only_virtual": false}