day4
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
"adventofcode2024/day01"
|
||||
"adventofcode2024/day02"
|
||||
"adventofcode2024/day03"
|
||||
"adventofcode2024/day04"
|
||||
|
||||
)
|
||||
// Usage: go run main.go <NN>
|
||||
// assumes input is in day<NN>/input.txt
|
||||
@@ -27,6 +29,9 @@ func main() {
|
||||
case 3:
|
||||
fmt.Printf("part 1: %d\n", day03.Part1(utils.Readfile(d)))
|
||||
fmt.Printf("part 2: %d\n", day03.Part2(utils.Readfile(d)))
|
||||
case 4:
|
||||
fmt.Printf("part 1: %d\n", day04.Part1(utils.Readfile(d)))
|
||||
fmt.Printf("part 2: %d\n", day04.Part2(utils.Readfile(d)))
|
||||
default:
|
||||
panic(fmt.Errorf("no such day: %d", d))
|
||||
}
|
||||
@@ -34,7 +39,7 @@ func main() {
|
||||
|
||||
// Reads day from os.Args.
|
||||
func day() int {
|
||||
latest := 2
|
||||
latest := 3
|
||||
if len(os.Args) == 1 {
|
||||
return latest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user