project euler之最大的回文产品

for i in range(998001,888888,-1):
    num = str(i)
    start = 0
    end = -1
    if num[start] == num[end]:
        start += 1
        end -= 1
        if num[start] == num[end]:
            start += 1
            end -= 1
            if num[start] == num[end]:
                start += 1
                end -= 1
                for i in range(999,900,-1):
                    for j in range(999,900,-1):
                        if i*j == int(num):
                            print(num)
                            print(i,j)
                        else:continue

 

posted @ 2018-07-06 23:24  托月的成长历程  阅读(147)  评论(0编辑  收藏  举报