Ejemplo n.º 1
0
 def isLycherl(n):
     _t = 50     # loop 50 times
     _cur = n + reversedNumber(n)
     while not ispalindromic(str(_cur)):
         _cur = _cur + reversedNumber(_cur)
         _t -= 1
         if _t < 0:
             return True
     return False
Ejemplo n.º 2
0
def problem36():
    _sum = 0
    for i in range(1000 * 1000):
        if ispalindromic(str(i)) and ispalindromic(bin(i)):
            _sum += i
    print(_sum)