An Elephant Problem

시간 제한1초메모리 제한2048 MB

요약
땅콩 하나의 무게가 m밀리그램이고 남은 부스러기가 d밀리그램일 때, d가 m 곱하기 p 이하가 되는 최소 p를 구한다.
난이도

쉬움10점 중 2점

유형
수학
정답자
아직 제출이 없습니다

문제

Gena is training an elephant to compete in the Iteratively Counting Peanuts Confrontation. As part of the training, Gena puts out pp 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 dd milligrams of peanut debris.

Gena knows that each peanut weighed exactly mm milligrams, but forgot how many peanuts he put out for his elephant. Although there could be up to m×pm \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, mm and dd (1≤m,d≤501 \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 dd milligrams of peanut debris.

예제4

  1. 예제 1

    입력
    1 1
    
    예상 출력
    1
    
  2. 예제 2

    입력
    3 14
    
    예상 출력
    5
    
  3. 예제 3

    입력
    27 18
    
    예상 출력
    1
    
  4. 예제 4

    입력
    6 7
    
    예상 출력
    2