We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bfb165 commit 9f9dc55Copy full SHA for 9f9dc55
Day13/main.go
@@ -7,6 +7,7 @@ import (
7
"log"
8
"os"
9
"strconv"
10
+ "time"
11
)
12
13
func findMinIndexAndValue(input []int) (int, int) {
@@ -125,12 +126,15 @@ func main() {
125
126
*/
127
128
// LET'S BRUTEFORCE THE CRAP OUT OF THIS
129
+ start := time.Now()
130
var sol, jump uint64 = 0, 1
131
for i := range busIDs {
132
for (sol+uint64(busOffsets[i]))%uint64(busIDs[i]) != 0 {
133
sol += jump
134
}
135
jump *= uint64(busIDs[i])
136
137
+ elapsed := time.Since(start)
138
fmt.Println(sol)
139
+ fmt.Printf("TIME: %s\n", elapsed)
140
0 commit comments