|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||1||1||1||100.000%|
Odd-even rationing is a common method to restrict resource consumption to half population on any given day. For example, a private vehicle is allowed to drive, park, or buy gasoline only on alternating days depends on whether its license plate is odd or even. This policy is enforced in Jakarta to reduce traffic jam during the Asian Games 2018, i.e. odd plate private vehicles are allowed to drive on some restricted roads and certain hours only on odd dates; similarly, even plate private vehicles are allowed only on even dates.
Despite its effectiveness, some people are unaware of the fact that zero (0) is an even number, and this might cause confusion. That’s why we need to investigate a variant of odd-even rationing.
In this problem, whether a license plate is even or odd is determined by its rightmost non-zero digit: If it is odd, then the license plate is considered odd; otherwise, the license plate is considered even. For example:
Notice that the smallest license plate number is 1, e.g. in our presidential plate, “RI 1”.
Your task is to investigate how many integers between A and B (inclusive) are odd plates, and how many of them are even plates.
Input contains two integers: A B (1 ≤ A ≤ B ≤ 1016) representing the interval [A, B] in which plates you should investigate.
Output in a line two integers: O E (separated by a single space) representing the number of odd plates and the number of even plates, respectively.
The odd plates are: 1, 3, 5, 7, 9, and 10.
The even plates are: 2, 4, 6, and 8.
The odd plates are: 297, 299, 300, 301, 303, 305, 307, 309, 310, and 311.
The even plates are: 296, 298, 302, 304, 306, and 308.