QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100

#3361. 饼干怪兽

統計

每个人都需要爱好,Christian 也不例外。他极其喜爱饼干。只要有饼干的地方,你就能找到 Christian。遗憾的是,他不太擅长管理自己的储备。他每天至少需要吃一块饼干,只要剩下的饼干足够,他每天就会吃掉 $C$ 块。已知他剩下 $N$ 块饼干,他能吃上至少一块饼干的天数是多少?

输入格式

输入的第一行包含一个整数 $T$,表示后续的测试用例数量。 每个测试用例包含一行,包含两个数字 $N$ 和 $C$,分别表示他拥有的饼干总数和他每天吃的饼干数量。

输出格式

对于每个测试用例,输出一行,包含一个数字,表示 Christian 还能吃饼干的天数。

数据范围

  • $0 < T \le 100$
  • $0 < N \le 1000000000$
  • $0 < C \le 5000$

样例

样例输入 1

2
6 2
10 3

样例输出 1

3
4

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.