adventofcode/2018/day12-1.go
2018-12-12 18:20:33 -05:00

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))
}