euler/python/e029.py

8 lines
197 B
Python

def euler_029():
return len(set([a**b for a in range(2, 101) for b in range(2, 101)]))
if __name__ == "__main__":
print("e029.py: {}".format(euler_029()))
assert(euler_029() == 9183)