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

[백준/파이썬] 30569번 Last One Standing

by 현장 2023. 12. 1.

-Code

from math import ceil
h1, d1, t1 = map(int, input().split())
h2, d2, t2 = map(int, input().split())

res1 = ceil((h2 - d1) / d1) * t1
res2 = ceil((h1 - d2) / d2) * t2

if res1 < res2:
    print("player one")
elif res1 > res2:
    print("player two")
else:
    print("draw")