heh
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | src/main.rs | 11 |
2 files changed, 8 insertions, 4 deletions
@@ -11,6 +11,7 @@ car = "0.1.1" # hinted = "0.0.1" itertools = "0.12.0" mattr = "1.0.0" +md5 = "0.7.0" memchr = "2.6.4" # radsort = "0.1.1" rustc-hash = { version = "2.1.0", features = ["nightly"] } diff --git a/src/main.rs b/src/main.rs index a163634..9e94395 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,10 +43,13 @@ fn area([l, w, h]: [u32; 3]) -> u32 { } #[no_mangle] pub unsafe fn p1(i: &str) -> impl Display { - i.行() - .map(|x| x.str().split('x').map(|x| x.λ()).carr::<3>()) - .map(|x| area(x) + x.sort().take::<2>().product()) - .sum::<u32>() + for n in 0.. { + let x = md5::compute(format!("iwrupvqb{n}")); + if x.0.take::<3>() == [0x00; 3] { + return n; + } + } + 0 } #[no_mangle] |