advent-of-code/day-04/working.tmp

12 lines
332 B
Plaintext

def get_points(match_count):
return 0 if match_count==0 else 2**(match_count-1)
total_points = 0
Read input line
`Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53`
card_no: int
winning_numbers: set()
my_numbers: list()
count intersections of the two number arrays.
total_points+=get_points(match_count)