#CCBCHMOT0000003. Đếm đến trước mốc (Count Before the Limit)
Đếm đến trước mốc (Count Before the Limit)
Count Before the Limit
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given integers a and b with a <= b, print all integers from a up to but not including b, in ascending order, one per line. If a=b, print nothing.
Input
One line contains integers a and b in that order.
Output
One integer in [a,b) per line; no output for an empty interval.
Subtasks
- Subtask 1 (20%): 0 <= a <= b <= 10.
- Subtask 2 (30%): -100 <= a <= b <= 100.
- Subtask 3 (50%): -1000000 <= a <= b <= 1000000.
Examples
Example 1
Input
3 6
Output
3
4
5
Explanation
The integers satisfying 3 <= i < 6 are 3, 4 and 5. The value 6 is excluded.
Example 2
Input
4 4
Output
Explanation
The interval is empty, so the loop executes zero times.