-
-
Save rust-play/63bc73bf4814016e435443ef9819eec0 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
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
fn steps(mut a: i128, mut b: i128, mut c: i128, mut d: i128) -> u32 { | |
let mut i = 0; | |
while coeffs != (0, 0, 0, 0) { | |
(a, b, c, d) = ((a - b).abs(), (b - c).abs(), (c - d).abs(), (d - a).abs()); | |
i += 1; | |
} | |
i | |
} | |
fn main() { | |
println!("{}", steps(87759737405187146732, 56850658833245721748, 20866, 104564663817187793641,)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment