Fixed day8
This commit is contained in:
parent
49e11349f5
commit
f96ab9d93b
|
@ -55,7 +55,7 @@ fn part1(input: &Input) -> usize {
|
|||
}
|
||||
}
|
||||
});
|
||||
set.len()
|
||||
sum
|
||||
}
|
||||
|
||||
#[aoc(day8, part2)]
|
||||
|
@ -113,7 +113,10 @@ mod tests {
|
|||
)),
|
||||
14
|
||||
);
|
||||
assert_eq!(part1(&parse(include_str!("../input/2024/day8.txt"))), 273);
|
||||
assert_eq!(
|
||||
part1(&parse(include_str!("../input/2024/day8.txt").trim_end())),
|
||||
273
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -124,6 +127,9 @@ mod tests {
|
|||
)),
|
||||
34
|
||||
);
|
||||
assert_eq!(part2(&parse(include_str!("../input/2024/day8.txt"))), 1017);
|
||||
assert_eq!(
|
||||
part2(&parse(include_str!("../input/2024/day8.txt").trim_end())),
|
||||
1017
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue