Skip to content

Commit cbea3ae

Browse files
Dev-06-06Copilot
andauthored
Update exercises/1000_programs/medium/1870_min_speed.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 99a0c2d commit cbea3ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎exercises/1000_programs/medium/1870_min_speed.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def minSpeedOnTime(dist, hour):
1515
time += (dist[i] + mid - 1) // mid
1616
# Last train doesn't need to wait for integer hour
1717
time += dist[-1] / mid
18-
if time <= hour:
18+
if time <= hour + 1e-9:
1919
ans = mid
2020
right = mid - 1
2121
else:

0 commit comments

Comments
 (0)