시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
0.1 초 128 MB 8535 2143 1798 33.290%

문제

땅 위에 달팽이가 있다. 이 달팽이는 높이가 V미터인 나무 막대를 올라갈 것이다.

달팽이는 낮에 A미터 올라갈 수 있다. 하지만, 밤에 잠을 자는 동안 B미터 미끄러진다. 또, 정상에 올라간 후에는 미끄러지지 않는다.

달팽이가 나무 막대를 모두 올라가려면, 며칠이 걸리는지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 세 정수 A, B, V가 공백으로 구분되어서 주어진다. (1 ≤ B < A ≤ V ≤ 1,000,000,000)

출력

첫째 줄에 달팽이가 나무 막대를 모두 올라가는데 며칠이 걸리는지 출력한다.

예제 입력 1

2 1 5

예제 출력 1

4
W3sicHJvYmxlbV9pZCI6IjI4NjkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWIyZWNcdWQzM2RcdWM3NzRcdWIyOTQgXHVjNjJjXHViNzdjXHVhYzAwXHVhY2UwIFx1YzJmNlx1YjJlNCIsImRlc2NyaXB0aW9uIjoiPHA+XHViNTQ1IFx1YzcwNFx1YzVkMCBcdWIyZWNcdWQzM2RcdWM3NzRcdWFjMDAgXHVjNzg4XHViMmU0LiBcdWM3NzQgXHViMmVjXHVkMzNkXHVjNzc0XHViMjk0IFx1YjE5Mlx1Yzc3NFx1YWMwMCBWXHViYmY4XHVkMTMwXHVjNzc4IFx1YjA5OFx1YmIzNCBcdWI5YzlcdWIzMDBcdWI5N2MgXHVjNjJjXHViNzdjXHVhYzA4IFx1YWM4M1x1Yzc3NFx1YjJlNC48XC9wPlxyXG5cclxuPHA+XHViMmVjXHVkMzNkXHVjNzc0XHViMjk0IFx1YjBhZVx1YzVkMCBBXHViYmY4XHVkMTMwIFx1YzYyY1x1Yjc3Y1x1YWMwOCBcdWMyMTggXHVjNzg4XHViMmU0LiBcdWQ1NThcdWM5YzBcdWI5Y2MsIFx1YmMyNFx1YzVkMCBcdWM3YTBcdWM3NDQgX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IG9mIG91dHB1dCBtdXN0IGNvbnRhaW4gdGhlIG51bWJlciBvZiBkYXlzIHRoYXQgdGhlIHNuYWlsIG5lZWRzIHRvIHJlYWNoIHRoZSB0b3AuJm5ic3A7PFwvcD5cclxuXHJcbjxwPiZuYnNwOzxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Croatian Open Competition in Informatics > COCI 2010/2011 > Contest #2 1번

  • 문제를 번역한 사람: baekjoon
  • 데이터를 추가한 사람: ccm2818
  • 문제의 오타를 찾은 사람: hellogaon
  • 빠진 조건을 찾은 사람: jh05013