Skip to content

Instantly share code, notes, and snippets.

@ultimatecoder
Created December 22, 2017 07:36
Show Gist options
  • Save ultimatecoder/42705fbc974b5b5de6a19825d1c8b9a2 to your computer and use it in GitHub Desktop.
Save ultimatecoder/42705fbc974b5b5de6a19825d1c8b9a2 to your computer and use it in GitHub Desktop.
def count_4_power(n):
results = []
for a in range(1, n+1):
for b in range(1, n+1):
for c in range(1, n+1):
for d in range(1, n+1):
if a ** 3 + b ** 3 == c ** 3 + d ** 3:
results.append((a, b, c, d))
return results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment