[python] 파이썬 기본수학 1-1

BOJ 1712 - 손익분기점

import math
a,b,c = map(int, input().split())
result = 0
if c<=b:
    result = -1
else:
    n = a/(c-b)
    if float(int(n)) == n:
        result = int(n) + 1
    else:
        result = int(math.ceil(n))
    
print(result)

댓글남기기