Skip to content

Instantly share code, notes, and snippets.

@mvallebr
Created February 10, 2021 23:04
Show Gist options
  • Select an option

  • Save mvallebr/e692816c249099b68b59a67d471d77c6 to your computer and use it in GitHub Desktop.

Select an option

Save mvallebr/e692816c249099b68b59a67d471d77c6 to your computer and use it in GitHub Desktop.
def sol_equa(n):
result = []
for y in range(n//2):
f = n + 4*y*y
if f > 0:
x = f ** 0.5
#print(f"y = {y} f = {f} x = ={x}")
if x % 1 == 0:
result.append([int(x), y])
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment