본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 18154번 Speeding

by 현장 2024. 11. 28.

-Code

n = int(input())
picture = [list(map(int, input().split())) for _ in range(n)]
res = 0

for i in range(1, n):
    res = max(
        res,
        (picture[i][1] - picture[i - 1][1]) // (picture[i][0] - picture[i - 1][0])
    )

print(res)