-
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
-
To solve the problems, you can either start a virtual contest or register for regular practice. A virtual contest simulates a participation in the original contest with a duration of 02:00:00, while regular practice lets you submit solutions without any constraints.
You must log in to register. - A Accelerated Learning
- D Divisibility test
- E Easy Query
- F Fact Check
- G Open Wide
- H High Noon
- K You wouldn't kill a kitten
- M Make Kattis Happy
- P Problemhunt?
- S Solution Presentation