Created
September 13, 2020 00:41
-
-
Save kinoshita-lab/30777052fffb82c0908a88dade873672 to your computer and use it in GitHub Desktop.
project euler problem 9
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
fn main() { | |
for a in 1..1000 { | |
for b in a..1000 { | |
for c in b..1000 { | |
if (a + b + c == 1000) && (a * a + b * b) == c * c{ | |
println!("{}", a * b * c); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment