improve python algorithm on Day04

This commit is contained in:
2023-12-12 21:13:27 +01:00
parent 336d7fe657
commit ead680fa94
3 changed files with 69 additions and 57 deletions

View File

@@ -88,7 +88,7 @@ fn parse(input: &str) -> Vec<Card> {
let winning = parse(winning);
let scratch = parse(scratch);
Card {
wins: scratch.iter().filter(|x| winning.contains(x)).count() as u8,
}