QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#16810. 护照检查的回忆

الإحصائيات

在拿到最新的护照后,你又重新开始了国际旅行。这一次,护照检查处的官员们只在你护照中最早的未盖章页面上盖章,因此你不需要提前申请新护照。

由于新的国际航空法,当你通过护照检查处时,会发生以下两种情况之一:要么只盖一页,要么恰好盖 $k$ 页。每次旅行你恰好通过一次护照检查处。

你的记忆有些模糊,已经不记得自己旅行了多少次。请计算,要使护照上恰好有给定数量的已盖章页面,你最少可能进行了多少次旅行。

输入格式

输入的第一行也是唯一的一行包含两个整数 $k$ 和 $s$($2 \le k \le 50$,$1 \le s \le 50$),其中 $k$ 是单次盖多个章时护照检查处盖章的页面数,$s$ 是你护照中已被盖章的总页面数。

输出格式

输出一个整数,表示你最少可能进行的旅行次数。可以证明,总是可以恰好得到 $s$ 个已盖章页面。

样例

输入样例 1

13 23

输出样例 1

11

输入样例 2

13 39

输出样例 2

3

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.