def run(): result = 0; for i in range(0, 1000000): if(is_palindrome_2(i) and eulermath.is_palindrome(i)): print i; result += i; #Print the result. eulersupport.write_output(result);
def run(): result = 0 for i in range(0, 1000000): if (is_palindrome_2(i) and eulermath.is_palindrome(i)): print i result += i #Print the result. eulersupport.write_output(result)
def run(exp): max_value = (10 ** exp) -1; #Inclusive upper bound of values. max_palin = 0; #Greater palindrome found. #Search backwards. for i in range(max_value, 1, -1): for j in range(i, 1, -1): #The number is palindrome and is greater that #current max palindrome? if((i * j) > max_palin and eulermath.is_palindrome(i * j)): max_palin = (i * j); #Print the result. eulersupport.write_output(max_palin);