본문 바로가기
Data Science/알고리즘 공부

[백준] #2869번 달팽이는 올라가고 싶다

by titaniumm 2020. 3. 10.
# while문을 이용하여 풀면 시간초과 난다
# V-b를 통하여 밤이되기전 낮에 완주를 하는 경우를 생각해줘야 한다.

import sys
a,b,v = map(int,sys.stdin.readline().split())
tem = (v-b) / (a-b)
if tem == int(tem):
    print(int(tem))
else:
    print(int(tem)+1)

댓글