Project Euler problem 29

Solution to problem 29 from Project Euler. Also written in Python as my previous post.

#!/usr/bin/env python
# Project Euler problem 29

list = []
for a in range(2, 101):
        for b in range(2, 101):
                product = a ** b
                list.append(product)
list.sort()
newlist = sorted(set(list))
print len(newlist)

Leave a Reply