~cpp 
def main():
    a=str(raw_input('input Number:'))
    while True:
        a = int(a)+int(a[::-1])
        b=0
        b=str(a)
        if int(b)==int(b[::-1]) :
            print a
            break
        else : a=str(a)
    

if __name__ == '__main__' :
    main()

Retrieved from http://wiki.zeropage.org/wiki.php/ReverseAndAdd/최경현
last modified 2021-02-07 05:27:55