Created
September 20, 2020 07:25
-
-
Save prrraveen/257c18d37ed32be01eb4c397a2d05244 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
for (int a = 1; a < 999; a++) { | |
for (int b = 1; b + a < 1000; b++) { | |
for (int c = 1; c+b+a < 1001; c++) { | |
if (a * a + b * b == c * c) { | |
p[a + b + c]++; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment