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

30215번 - Age Expression 다국어

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

문제

Dr. O has two granddaughters (named Alyssa and Konari) and they keep Dr. O young!

When people ask Dr. O how old he is, rather than giving one positive integer (his age), Dr. O provides two positive integers a and k; Dr. O’s age can then be computed using the expression (a × Alyssa’s age) + (k × Konari’s age).

Given three positive integers (Dr. O’s age, Alyssa’s age, and Konari’s age), determine if the positive integers a and k exist.

입력

There is only one input line; it provides (respectively) Dr. O’s age, Alyssa’s age, and Konari’s age. Assume that 1 ≤ Konari’s age < Alyssa’s age < Dr. O’s age ≤ 150.

출력

Print 1 (one) if a and k exist, 0 (zero) otherwise. Note that a and k must both be greater than zero.

제한

예제 입력 1

69 9 1

예제 출력 1

1

예제 입력 2

76 11 7

예제 출력 2

1

예제 입력 3

50 9 3

예제 출력 3

0

예제 입력 4

70 10 5

예제 출력 4

1

예제 입력 5

10 7 2

예제 출력 5

0

힌트

출처

University > University of Central Florida > 2023 Local Programming Contest (Qualifying Round) 2번

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

출처

대학교 대회

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

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