| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 303 | 276 | 254 | 91.697% |
After getting your latest passport, you are back to traveling internationally. This time, officers at passport control have been stamping only the earliest unstamped pages in your passport, so you have not needed to apply for a new passport early.
Due to new international aviation laws, when you pass through passport control, one of two things happens: either a single page is stamped, or exactly $k$ pages are stamped. You pass through passport control exactly once per trip.
Your memory is foggy, and you no longer remember how many trips you have taken. Compute the minimum number of trips you could have taken to end up with exactly the given number of stamped pages in your passport.
The first and only line of input contains two integers $k$ and $s$ ($2 \le k \le 50$, $1 \le s \le 50$), where $k$ is the number of pages passport control stamps when stamping multiple pages at once, and $s$ is the total number of pages that have been stamped in your passport.
Output a single integer, the minimum number of trips you could have taken. It can be proven that it is always possible to have exactly $s$ stamped pages.
13 23
11
13 39
3
ICPC > Regionals > North America > Southeast USA Regional > 2025 Southeast USA Regional Programming Contest > Division 2 H번
ICPC > Regionals > North America > South Central USA Regional > 2025 South Central USA Regional Contest > Division 2 H번
ICPC > Regionals > North America > Mid-Atlantic Regional > 2025 Mid-Atlantic USA Regional Contest > Division 2 H번