projecteuler Problem 29

def Judge(small,big):
    lsum=[]
    num=0
    for i in range(small,big+1):
        for j in range(small,big+1):
            num=i**j
            if(lsum.count(num)==0):
                lsum.append(num)
        
    return len(lsum)
        

print Judge(2,100)


 

你可能感兴趣的:(projecteuler Problem 29)