solved prime palindrome in C,Python,Java