Skip to content

Commit

Permalink
day22
Browse files Browse the repository at this point in the history
  • Loading branch information
vslinko committed Dec 22, 2024
1 parent 18b242c commit 1bc9891
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/day22.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ unsafe fn inner1(input: &str) -> i64 {
let mut nums = [0; 64];

while i < input.len() {
for j in 0..64 {
(0..64).for_each(|j| {
if i < input.len() {
*nums.get_unchecked_mut(j) = read_unsigned_skip!(input, i);
} else {
*nums.get_unchecked_mut(j) = 0;
}
}
});

let mut nums = i64x64::from_slice(&nums);

Expand All @@ -73,14 +73,14 @@ unsafe fn inner1(input: &str) -> i64 {
}};
}

for _ in 0..2000 {
(0..2000).for_each(|_| {
mix!(nums * _64);
prune!();
mix!(nums / _32);
prune!();
mix!(nums * _2048);
prune!();
}
});

result += nums.reduce_sum();
}
Expand Down

0 comments on commit 1bc9891

Please sign in to comment.