This commit is contained in:
2024-12-05 16:47:11 +00:00
parent 88938a8627
commit d3cebaad19
4 changed files with 1587 additions and 3 deletions

View File

@@ -10,8 +10,8 @@ import (
"adventofcode2024/day01"
"adventofcode2024/day02"
"adventofcode2024/day03"
"adventofcode2024/day04"
"adventofcode2024/day04"
"adventofcode2024/day05"
)
// Usage: go run main.go <NN>
// assumes input is in day<NN>/input.txt
@@ -32,6 +32,9 @@ 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)))
default:
panic(fmt.Errorf("no such day: %d", d))
}
@@ -39,7 +42,7 @@ func main() {
// Reads day from os.Args.
func day() int {
latest := 3
latest := 4
if len(os.Args) == 1 {
return latest
}