Skip to content

Instantly share code, notes, and snippets.

@clementi
Created February 9, 2011 23:09
Show Gist options
  • Save clementi/819535 to your computer and use it in GitHub Desktop.
Save clementi/819535 to your computer and use it in GitHub Desktop.
Project Euler Problem #29 Solution
products = set()
for pair in [(a, b) for a in range(2, 101) for b in range(2, 101)]:
products.add(pair[0] ** pair[1])
print len(products)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment