Skip to content

Instantly share code, notes, and snippets.

@kinoshita-lab
Created September 13, 2020 00:41
Show Gist options
  • Save kinoshita-lab/30777052fffb82c0908a88dade873672 to your computer and use it in GitHub Desktop.
Save kinoshita-lab/30777052fffb82c0908a88dade873672 to your computer and use it in GitHub Desktop.
project euler problem 9
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