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

8483번 - Earthquake 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB2331368460.870%

문제

The Infinity City is located on an infinite quarterplane. There is an infinite number of sky-scrapers in the city, there is one sky-scraper located at every point with integer coordinates.

One unfortunate day there was an earthquake in the city. There was a huge tectonic crack along the line Ax + By = C and all the sky-scrapers at positions satisfying the inequality Ax + By > C simply disappeared. The city has now become a Finity City with only a finite number of sky-scrapers. But exactly how many?

입력

The only line of input contains three space-separated positive integers A, B, C. They are bounded as follows: A, B ≤ 1 000 000 000, C ≤ min(A, B) × 1 000 000 000.

출력

Your program should output exactly one integer: the number of sky-scrapers in the Finity City.

제한

예제 입력 1

3 4 13

예제 출력 1

12

힌트

출처

Camp > POI Training Camp > ONTAK 2010 7-3번

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

출처

대학교 대회

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

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