Algorithm/PS

[BOJ/백준] 5666 - Hot Dogs [python]

chanwoong1 2023. 3. 15. 20:12
728x90

문제 링크

 

5666번: Hot Dogs

In 2012 a new world record was set in the famous Nathan’s Hot Dog Eating Competition: the champion, Joey Chestnut, ate 68 hot dogs in ten minutes, an amazing increase from the 62 hot dogs eaten by the same Chestnut in 2011. Nathan’s Famous Corporation,

www.acmicpc.net

문제 풀이

입력값에 EOF가 들어올 때 까지 계속 계산 결과를 출력해준다. 계산은 단순 사칙연산이고, 소숫점 2번째 자리까지 출력한다.

정답 코드

try :
    while True :
        a, b = map(int, input().split())
        print("{:.2f}".format(a / b))
except :
    exit(0)
728x90