This commit is contained in:
2023-12-12 12:33:37 +00:00
parent c53e7db1ea
commit 84e8207917
4 changed files with 840 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import (
"adventofcode2023/day05"
"adventofcode2023/day06"
"adventofcode2023/day07"
"adventofcode2023/day08"
)
// Usage: go run main.go <NN>
// assumes input is in day<NN>/input.txt
@@ -43,6 +44,9 @@ func main() {
case 7:
fmt.Printf("part 1: %d\n", day07.Part1(utils.Readfile(d)))
fmt.Printf("part 2: %d\n", day07.Part2(utils.Readfile(d)))
case 8:
fmt.Printf("part 1: %d\n", day08.Part1(utils.Readfile(d)))
fmt.Printf("part 2: %d\n", day08.Part2(utils.Readfile(d)))
default:
panic(fmt.Errorf("no such day: %d", d))
}
@@ -50,7 +54,7 @@ func main() {
// Reads day from os.Args.
func day() int {
latest := 6
latest := 7
if len(os.Args) == 1 {
return latest
}