This commit is contained in:
2022-12-19 15:07:39 +01:00
parent 3e927f2f70
commit 0aa38a19f1
3 changed files with 250 additions and 0 deletions

20
day19/ex2/main.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import (
"aoc2022/day19/common"
"bufio"
"fmt"
"os"
)
func main() {
factories := common.Parse(*bufio.NewScanner(os.Stdin), 3, 32)
result := 1
for i := range(factories) {
factories[i].StartOptimizedProduction()
result *= factories[i].GetNumberOfGeodes()
}
fmt.Println(result)
}