From c92bae476174f07a28765de2b129c9c3d5d579b5 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Thu, 14 Dec 2023 22:05:30 -0600 Subject: [PATCH] update comments --- readme.md | 5 +---- src/bin/day14.rs | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) 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;