QOJ.ac

QOJ

実行時間制限: 1.0 s メモリ制限: 256 MB 満点: 100 ハック可能 ✓

#12067. 大整数分解

統計

我非常喜欢数论,尤其是喜欢对整数进行因式分解。 对大整数进行因式分解能给我带来极大的快感,但这通常是一项艰巨的任务。 我的老师给了我一个新的因式分解任务——“给定整数 $N$,你必须对大整数 $N^4 + 64$ 进行因式分解。” 第一步,我想把 $N^4 + 64$ 表示为两个整数 $a$ 和 $b$ 的乘积。 当然,必须满足 $1 < a, b < N^4 + 64$。 我能做到这一点,但现在我非常忙。 你能帮帮我吗?

输入格式

第一行包含一个整数 $T$ ($1 \le T \le 10000$),表示测试用例的数量。 每个测试用例包含一个整数 $N$ ($1 \le N \le 10000$)。

输出格式

输出满足 $N^4 + 64 = a \times b$ 的 $a$ 和 $b$。 如果存在多个解,输出其中任意一个即可。

样例

样例输入 1

1
1

样例输出 1

5 13

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.