标签:
def judge(n): count=0 for i in xrange(2,10+1): x=‘‘ tmp=n while tmp!=0: x+=str(tmp%i) tmp/=i if x==x[::-1]: count+=1 if count==2: return True return False def foo(): n=1600000 while True: n+=1 if judge(n): print n break pass if __name__ == ‘__main__‘: foo() print ‘ok‘ pass
标签:
原文地址:http://www.cnblogs.com/test404/p/5294714.html