Created
October 2, 2014 11:38
-
-
Save mpetyx/695c70be98a46138707c to your computer and use it in GitHub Desktop.
Hardy Ramanujan Number in Python. A sample implementation with no optimizations
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
__author__ = 'mpetyx' | |
for x in range(1, 2000): | |
for y in range(1, 2000): | |
for z in range(1, 2000): | |
for g in range(1, 2000): | |
if g * g * g + z * z * z == x * x * x + y * y * y: | |
if (g == z) or (g == y) or (g == x) or (z == y) or (z == x) or (y == x): | |
continue | |
else: | |
print "x=", x | |
print "y=", y | |
print "z=", z | |
print "g=", g | |
print g * g * g + z * z * z | |
SneakyBerry
commented
Sep 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment