BOJ - 5032 - 탄산 음료

Updated:

import sys

def solution():
    E, F, C = map(int, sys.stdin.readline().split())
    juice = E + F
    ret = 0
    while juice >= C:
        ret += juice // C
        juice = juice // C + juice % C
    print(ret)

solution()

https://www.acmicpc.net/problem/5032

Categories:

Updated:

Leave a comment