Advent of Code 2023 - Day 4Scratchcards
| Problem statement | Source code | Tags:
Part 1
The score for each line is just the number of numbers that are in winning.
Because no match = 0, 1 match = 1 = , matches = , the score can be calculated as (floor is needed because ).
Part 2
We can do bin counting of each scratchcard. Each card increments the cards following it by its own count.