From 0000042080175a9d4ba069cda5c44436a3377335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Tue, 13 Dec 2022 23:56:32 +0100 Subject: [PATCH] solution: cleanup day25 part1 --- src/bin/25.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/25.rs b/src/bin/25.rs index 1284031..4fd24b1 100644 --- a/src/bin/25.rs +++ b/src/bin/25.rs @@ -1,4 +1,7 @@ const ONE: u64 = 20151125; +const MULTIPLY: u64 = 252533; +const MOD: u64 = 33554393; + pub fn part_one(input: &str) -> Option { let l = input.len(); let (row, column): (u32, u32) = input[80..l - 1] @@ -10,13 +13,13 @@ pub fn part_one(input: &str) -> Option { let mut c = 1; let mut code = ONE; while c < n { - code = (code * 252533) % 33554393; + code = (code * MULTIPLY) % MOD; c += 1; } Some(code) } -pub fn part_two(input: &str) -> Option { +pub fn part_two(_input: &str) -> Option { None } fn main() {