U E D R , A S I H C RSS

Reverse And Add/김범준

~cpp 

def main():
    number = str(input('입력: '))
    reverse = ''
    for n in range(1, 100):
        if number != reverse:
            reverse = number[::-1]
            nnumber = int(number)
            rnumber = int(reverse)
            nnumber = nnumber + rnumber
            number = str(nnumber)
            reverse = number[::-1]
            print number
        else:
            return 0
            
if __name__ == '__main__':
    main()



Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 0.0870 sec