QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 1024 MB Total points: 100

#3716. 简单算术

Statistics

给定两个均在 $64$ 位有符号整数范围内的整数 $a$ 和 $b$,求 $\lfloor \frac{a}{b} \rfloor$,其中 $\lfloor x \rfloor$ 表示不超过 $x$ 的最大整数。

输入格式

输入包含零个或多个测试用例,并以文件结束符(EOF)终止。

每个测试用例包含两个整数 $a, b$。

  • $-2^{63} \leq a, b < 2^{63}$
  • $b \neq 0$
  • 测试用例数量不超过 $10^4$。

输出格式

对于每个测试用例,输出一个表示结果的整数。

样例

输入格式 1

3 2
3 -2
-9223372036854775808 1
-9223372036854775808 -1

输出格式 1

1
-2
-9223372036854775808
9223372036854775808

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.