attribution for copied code

This commit is contained in:
Spectre 2023-12-08 11:41:08 +01:00
parent 47f8a87e0d
commit 6787a05c3a

View file

@ -94,6 +94,7 @@ impl Solution for Day08 {
} }
} }
// Shamelessly copied from https://rustycloud.org/_code_samples/gcd.html
fn gcd(mut n: u64, mut m: u64) -> u64 { fn gcd(mut n: u64, mut m: u64) -> u64 {
// Make sure that either number isn't 0 // Make sure that either number isn't 0
assert!(n != 0 && m != 0); assert!(n != 0 && m != 0);