EasyRating 1050
Kaprekar Numbers
Square a d-digit number n. Split the square into a right part of d digits and a left part of the rest (empty means 0). n is Kaprekar if the parts add up to n. Print all Kaprekar numbers from p to q, or INVALID RANGE.
Input
Two integers p and q (1 ≤ p ≤ q ≤ 10⁵).
Output
The numbers, or INVALID RANGE.
Sample 1
Input
1 100
Output
1 9 45 55 99
Sample 2
Input
100 200
Output
INVALID RANGE
Output appears here