Created
June 12, 2022 15:06
-
-
Save erikseulean/80c597ce77a7c262e523142af408e821 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 find_perfect_squares(number): | |
perfect_squares = {i * i for i in range(sqrt(n)} | |
for other_i in sqrt(n): | |
if n - other_i * other_i in perfect_squares: | |
return True | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment