You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
aoc2020/day06/solve2.go

22 lines
360 B

package day06
import (
"log"
)
func Solve2() {
counter := 0
for _, row := range rows {
// Get the amount of votes on each question
for _, amount := range row.Votes {
// Check that everyone voted yes on that
if amount == row.Size {
// If so, increment counter
counter++
}
}
}
log.Printf("2020-12-06.02: Answer: %d\n", counter)
}