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