f=lambda x,c=0:`c`[::-1]==`c`and c or f(x,c+x) print(f(1))print(f(2))print(f(16))print(f(17))print(f(42))print(f(111))print(f(302))print(f(1234))
Standard input is empty
1 2 272 272 252 111 87278 28382
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!