day5 part2

This commit is contained in:
2023-12-06 13:48:16 +00:00
parent 34e8893d31
commit 204e001459
2 changed files with 21 additions and 30 deletions

View File

@@ -11,6 +11,8 @@ import (
"adventofcode2023/day02"
"adventofcode2023/day03"
"adventofcode2023/day04"
"adventofcode2023/day05"
"adventofcode2023/day06"
)
// Usage: go run main.go <NN>
// assumes input is in day<NN>/input.txt
@@ -31,6 +33,12 @@ func main() {
case 4:
fmt.Printf("part 1: %d\n", day04.Part1(utils.Readfile(d)))
fmt.Printf("part 2: %d\n", day04.Part2(utils.Readfile(d)))
case 5:
fmt.Printf("part 1: %d\n", day05.Part1(utils.Readfile(d)))
fmt.Printf("part 2: %d\n", day05.Part2(utils.Readfile(d)))
case 6:
fmt.Printf("part 1: %d\n", day06.Part1(utils.Readfile(d)))
fmt.Printf("part 2: %d\n", day06.Part2(utils.Readfile(d)))
default:
panic(fmt.Errorf("no such day: %d", d))
}
@@ -38,7 +46,7 @@ func main() {
// Reads day from os.Args.
func day() int {
latest := 3
latest := 5
if len(os.Args) == 1 {
return latest
}