File tree 3 files changed +5
-3
lines changed 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ func Solve(r io.Reader) any {
19
19
20
20
for i := 1 ; i < len (timeStrings ); i ++ {
21
21
time , err := strconv .ParseFloat (timeStrings [i ], 64 )
22
- utils .Check (err , "Unable to parse %s into float " , timeStrings [i ])
22
+ utils .Check (err , "Unable to parse %s into float64 " , timeStrings [i ])
23
23
24
24
distance , err := strconv .ParseFloat (distanceStrings [i ], 64 )
25
+ utils .Check (err , "unable to convert %s to float64" , distanceStrings [i ])
25
26
26
27
tPressMin := 0.5 * time - 0.5 * math .Sqrt (time * time - 4.0 * distance )
27
28
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ func Solve(r io.Reader) any {
19
19
distanceString := strings .Join (distanceStrings [1 :], "" )
20
20
21
21
time , err := strconv .ParseFloat (timeString , 64 )
22
- utils .Check (err , "Unable to parse %s into float " , timeString )
22
+ utils .Check (err , "Unable to parse %s into float64 " , timeString )
23
23
24
24
distance , err := strconv .ParseFloat (distanceString , 64 )
25
+ utils .Check (err , "Unable to parse %s to float64" , distanceString )
25
26
26
27
tPressMin := 0.5 * time - 0.5 * math .Sqrt (time * time - 4.0 * distance )
27
28
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func (p Point) Left() Point {
43
43
return Point {- p .Y , p .X }
44
44
}
45
45
46
- // Return metropolis magnitude (abs(x)+abs(y))
46
+ // Return manhattan magnitude (abs(x)+abs(y))
47
47
func (p Point ) Manhattan () int {
48
48
return abs (p .X ) + abs (p .Y )
49
49
}
You can’t perform that action at this time.
0 commit comments