You are viewing a single comment's thread. Return to all comments →
L=[] N=int(input("")) if N>=2 and N<=10**5: for a in range(2,N+1): for b in range(2,N+1): c=a**b if c not in L: L.append(c) else: pass print(len(L)) else: pass
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #29: Distinct powers
You are viewing a single comment's thread. Return to all comments →