Created
December 22, 2017 08:09
-
-
Save ultimatecoder/c7c4f8e7f5906a0a5eae94318ef14100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_order_n3(n): | |
results = [] | |
for a in range(1, n+1): | |
for b in range(1, n+1): | |
for c in range(1, n+1): | |
d = a + b - c | |
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