how to find square of palindromes numbers which should also be a palindrome and within range

I solved this problem but it runs slowly in large data range
such as
from:100000200002102004004012042030080030240210400400201200001999901 to:100000200002102004004012042030080030240210400400201200002000002
and there are multiple of test cases like this
Could you please tell me alternative to this solution

can you give me the question linkā€¦??

1 Like