Logo
(追記) (追記ここまで)

24805번 - Climbing Worm 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB55829726654.286%

문제

A worm is at the bottom of a pole. It wants to reach the top, but it is too lazy to climb to the top without stopping. It can crawl up the pole a certain number of inches at a time, falling down a lesser number of inches right after while it rests. How many times does the worm need to crawl up in order to reach the top of the pole?

입력

The input consists of a single line that contains three integers $a, b$ (0ドル \leq b < a \leq 100$), and $h,ドル (0ドル < h \leq 100,000円$) indicating the amount $a$ of inches the worm can climb at a time, the amount $b$ of inches the worm falls during its resting period, and the height $h$ of the pole, respectively. Note: For the purposes of this problem, the worm is modeled as a point and thus has no length.

출력

Output the number of times the worm must crawl up in order to reach the top of the pole.

제한

예제 입력 1

5 0 15

예제 출력 1

3

예제 입력 2

3 1 4

예제 출력 2

2

힌트

출처

School > Virginia Tech High School Programming Contest > 2018 Virginia Tech High School Programming Contest A번

  • 문제를 만든 사람: Andrew Ahnn
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /