This commit is contained in:
2023-12-08 12:02:06 +00:00
parent 011e162b3c
commit 3308431dfa
4 changed files with 1329 additions and 1 deletions

View File

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