You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
360 B
Go
23 lines
360 B
Go
3 years ago
|
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)
|
||
|
}
|