Skip to content

Commit

Permalink
fix copy paste
Browse files Browse the repository at this point in the history
  • Loading branch information
kcaffrey committed Dec 19, 2023
1 parent f823279 commit 75469c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/18.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn solve_part1_fast(input: &str) -> i64 {
}
let distance: i64 = input[start + 2..=index]
.iter()
.fold(0, |acc, &ch| (acc << 4) + ((ch - b'0') as i64));
.fold(0, |acc, &ch| (acc * 10) + ((ch - b'0') as i64));
let next = match input[start] {
b'R' => Point::new(prev.x + distance, prev.y),
b'D' => Point::new(prev.x, prev.y + distance),
Expand Down

0 comments on commit 75469c3

Please sign in to comment.