diff --git a/readme.md b/readme.md index 3b925cd..1782206 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,3 @@ # AOC 23 -# Day 1 Trebuchet?! - -`cr --bin d1_0` - +Complete all of AoC 2023 in Rust. No specific constraints, not going for any kind of high speed or clean code. diff --git a/src/bin/day14.rs b/src/bin/day14.rs index 3a735e1..ea58e48 100644 --- a/src/bin/day14.rs +++ b/src/bin/day14.rs @@ -177,9 +177,9 @@ fn part2(input: String) -> Result { // Figure out final score based on sliding window of known scores within the // repeated pattern: // - // (cycles - repeated index) gives us the remaining times we need to run through. We - // then get the remainder of that divided by the difference of the current index minus - // all seen (total repeating count). + // (cycles - repeated index) gives us the remaining times we need to run through. + // We then get the remainder of that divided by the difference of the current + // index minus all seen (total repeating count). answer = scores [repeated_index - 1 + (cycles - repeated_index) % (seen.len() - repeated_index)]; break;