Untitled
unknown
plain_text
a month ago
322 B
3
Indexable
Never
func TryFinish(car *Car, distance int) string { approximate_distance := distance if distance%2 != 0 { approximate_distance -= 1 } if car.battery*2 < approximate_distance { car.battery = 0 return "" } else { car.battery -= distance / 2 return fmt.Sprintf("%.2f", float64(distance)/float64(car.speed)) } }
Leave a Comment