#SQ2SQ. SQUARE TO SQUARE
SQUARE TO SQUARE
There are squares whose digits can be rearranged to make another squares. Lets call them S2S numbers.
for example: 144 → 441
Input
Single line containing two integers X Y (Xth, Yth term in the list of S2S numbers). Xth, Yth term<=10^12.
Output
Print all the numbers from Xth to Yth term of S2S numbers list (both inclusive).
Example
Input: 1 3</p>Output: 144 169 196
(Source Code Limit= 500B)
Note: 1 → 100 → 1 or other similar numbers are NOT S2S numbers (example 9 → 900 → 9)
Try Tutorial at http://www.spoj.com/problems/SQ2SQ2/