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

34795번 - An Elephant Problem 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB25922020586.864%

문제

Gena is training an elephant to compete in the Iteratively Counting Peanuts Confrontation. As part of the training, Gena puts out $p$ peanuts and the elephant has to count all of them.

However, elephants are not that good at counting peanuts, and Gena's elephant crushes some of the peanuts during the training. Gena is tasked with cleaning up the peanut debris that is leftover. Gena cleans up $d$ milligrams of peanut debris.

Gena knows that each peanut weighed exactly $m$ milligrams, but forgot how many peanuts he put out for his elephant. Although there could be up to $m \times p$ milligrams of peanut debris, for various reasons the amount of debris could be much lower.

Help Gena compute the minimum number of peanuts he could have put out for the elephant!

입력

The first and only line of input contains two integers, $m$ and $d$ (1ドル \le m, d \le 50$).

출력

Output a single integer, the minimum number of peanuts that Gena could have put out that could have resulted in his elephant leaving $d$ milligrams of peanut debris.

제한

예제 입력 1

1 1

예제 출력 1

1

예제 입력 2

3 14

예제 출력 2

5

예제 입력 3

27 18

예제 출력 3

1

예제 입력 4

6 7

예제 출력 4

2

노트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2025 ICPC Pacific Northwest Regional > Division 2 A번

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

출처

대학교 대회

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

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