User:Inthar/Code: Difference between revisions
No edit summary |
|||
| Line 931: | Line 931: | ||
use std::io::Write; | use std::io::Write; | ||
use std::time::Instant; | use std::time::Instant; | ||
fn main() -> std::io::Result<()> { | fn main() -> std::io::Result<()> { | ||
| Line 976: | Line 939: | ||
for b in 1..=a { | for b in 1..=a { | ||
for c in 1..=b { | for c in 1..=b { | ||
if a + b + c <= 31 && gcd(gcd(a as i64, b as i64), c as i64) == 1 { | if a + b + c <= 31 && scale_theory::gcd(scale_theory::gcd(a as i64, b as i64), c as i64) == 1 { | ||
writeln!(&f, "== {}x{}y{}z ==", a, b, c); | writeln!(&f, "== {}x{}y{}z ==", a, b, c); | ||
let billiard_scales = scale_theory::billiard_scales(a, b, c); | let billiard_scales = scale_theory::billiard_scales(a, b, c); | ||
| Line 992: | Line 955: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Cargo.toml === | === Cargo.toml === | ||
<syntaxhighlight lang="toml"> | <syntaxhighlight lang="toml"> | ||