QOJ.ac

QOJ

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

#14916. 大象问题

الإحصائيات

Gena 正在训练一只大象,以准备参加“迭代数花生对抗赛”(Iteratively Counting Peanuts Confrontation)。作为训练的一部分,Gena 拿出了 $p$ 颗花生,大象需要数出所有的花生。

然而,大象并不擅长数花生,Gena 的大象在训练过程中踩碎了一些花生。Gena 的任务是清理剩下的花生碎屑。Gena 清理了 $d$ 毫克的花生碎屑。

Gena 知道每颗花生恰好重 $m$ 毫克,但他忘记了自己给大象放了多少颗花生。虽然最多可能会有 $m \times p$ 毫克的花生碎屑,但由于各种原因,碎屑的量可能会少得多。

请帮助 Gena 计算他最少可能给大象放了多少颗花生!

输入格式

输入唯一的一行,包含两个整数 $m$ 和 $d$($1 \le m, d \le 50$)。

输出格式

输出一个整数,表示 Gena 最少可能放出的花生数量,使得大象最后留下了 $d$ 毫克的花生碎屑。

样例

输入样例 1

1 1

输出样例 1

1

输入样例 2

3 14

输出样例 2

5

输入样例 3

27 18

输出样例 3

1

输入样例 4

6 7

输出样例 4

2

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.