This commit is contained in:
2022-12-01 07:10:11 +01:00
commit d4eb4a757c
4 changed files with 93 additions and 0 deletions

21
01/1.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
inventories := parse(*bufio.NewScanner(os.Stdin))
largestInventoryTotal := 0
for _, inventory := range inventories {
currentTotal := inventory.getTotal()
if currentTotal > largestInventoryTotal {
largestInventoryTotal = currentTotal
}
}
fmt.Println(largestInventoryTotal)
}