Created
July 8, 2023 16:44
-
-
Save jmccardle/0f5e4fb48ab9f66da1f42035594c84bd 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
# See this diagram: https://i.redd.it/41iyyfdaliab1.png | |
from itertools import permutations | |
for i, perm in enumerate(permutations([1,2,3,4,6,8,9])): | |
a, b, c, d, e, f, g = perm | |
if (a + d + g + f) +1 == (b + d + e + g) -1 == (c * e * f * g +1)**0.5: | |
print(f"\n{i}. Solution: a = {a}, b = {b}, c = {c}, d = {d}, e = {e}, f = {f}, g = {g}, x = {(a+d+g+f)+1}") | |
elif i % 10 == 0: | |
print(f".", end='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment