google code jam

i just went through the problem,and i am able to solve it easily. but i am not getting any idea how to deal with the bigger numbers(limit is set to (10^100)).

problem description-
a number that is a palindrome and the square of a palindrome at the same time. For instance, 1, 9 and 121 are fair and square (being palindromes and squares, respectively, of 1, 3 and 11), while 16, 22 and 676 are not fair and square: 16 is not a palindrome, 22 is not a square, and while 676 is a palindrome and a square number, it is the square of 26, which is not a palindrome.

Now he wants to search for bigger fair and square numbers. Your task is, given an interval Little John is searching through, to tell him how many fair and square numbers are there in the interval, so he knows when he has found them all.

please tell me how to deal with large numbers >10^19 .
thanks

1 Like

Did you read the editorial?

https://code.google.com/codejam/contest/2270488/dashboard#s=a&a=2

4 Likes

the editorial above clears all doubt , even it tells you the algorithm of doing such problems .