Please solve it...and give a optimum solution.
digit sum of any perfect square is 14970&divisibility rule of 3 is sum of digits should be divisible by 3 when a digit sum ofsquare of any prime number divided by 3 you get reminder 1