22 lines
307 B
Go
22 lines
307 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"internal/day12"
|
|
"internal/util"
|
|
)
|
|
|
|
const NumGenerations = 20
|
|
|
|
func main() {
|
|
data := util.ReadInput()
|
|
plants, rules := day12.ParseInput(data)
|
|
|
|
for i := 0; i < NumGenerations; i++ {
|
|
plants = day12.RunGeneration(plants, rules)
|
|
}
|
|
|
|
fmt.Println(day12.SumPlants(plants))
|
|
}
|