adventofcode/2018/day12-1.go

22 lines
307 B
Go
Raw Normal View History

2018-12-12 23:20:33 +00:00
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))
}