low and high holding positive integers. Return how many mirror squares lie in the range [low, high], inclusive.
The numbers go up to 10¹⁸, so you cannot simply check each one.low="1", high="500" → 5
The matches are 1 = 1², 4 = 2², 9 = 3², 121 = 11² and 484 = 22². 676 = 26² is a palindrome, but 26 is not, and it lies outside the range anyway.
low="10", high="100" → 0
No palindrome squared lands between 10 and 100 as a palindrome.
low="10000", high="50000" → 5
low and high consist of digits and have no leading zeroslow="1", high="500"
5
Run checks the first 3 tests in your browser. Submit checks all 76 tests on the server, hidden ones included.