Skip to content

Instantly share code, notes, and snippets.

@shieldsd
Created March 30, 2012 14:17
Show Gist options
  • Save shieldsd/2251811 to your computer and use it in GitHub Desktop.
Save shieldsd/2251811 to your computer and use it in GitHub Desktop.
Project Euler #29
def combs(low, high):
result = []
i = low
j = low
while i <= high:
while j <= high:
result.append(i ** j)
j += 1
i += 1
j = low
return result
print len(set(combs(2, 100)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment