This commit is contained in:
2023-07-16 23:12:47 +02:00
parent fb8cf978a0
commit 50b147dec7

18
speeding.py Normal file
View File

@@ -0,0 +1,18 @@
n = int(input())
prev_t = prev_d = None
max_speed = 0
for _ in range(n):
t, d = map(int, input().split())
if prev_t is None:
prev_t = t
prev_d = d
continue
speed = (d - prev_d) / (t - prev_t)
max_speed = max((speed, max_speed))
prev_t = t
prev_d = d
print(int(max_speed))