QOJ.ac

QOJ

Limite de temps : 1.0 s Limite de mémoire : 256 MB Points totaux : 100 Hackable ✓

#15355. 扩展孪生合数

Statistiques

你听说过孪生素数猜想吗?如果两个素数 $a$ 和 $b$ 满足 $a + 2 = b$,则称它们为孪生素数。孪生素数猜想是数学中一个未解决的难题,它要求证明或证伪“存在无穷多对孪生素数”这一命题。

2013 年 4 月 17 日,张益唐宣布证明了存在一个小于 7000 万的整数 $c$,使得有无穷多对素数的差为 $c$。截至 2014 年 4 月 14 日(张益唐宣布一年后),这一上界已被缩小至 246。人们希望这个上界能变得越来越小,从而最终找到该猜想的证明。

对于我们亲爱的参赛者,我们为您准备了另一个类似的问题,即扩展孪生合数问题:给定一个正整数 $n$,找到两个整数 $x$ 和 $y$,使得 $x + n = y$,且 $x$ 和 $y$ 都是合数。

输入格式

每个输入文件包含多个测试用例。输入的第一行包含一个整数 $T$(约为 $10^5$),表示测试用例的数量。对于每个测试用例:

唯一的一行包含一个整数 $n$($1 \le n \le 10^9$)。

输出格式

对于每个测试用例,在一行中输出两个整数,表示 $x$ 和 $y$,其中 $1 \le x, y \le 10^{18}$。如果存在多个合法答案,您可以输出其中任意一个;如果不存在合法答案,则输出 “-1”(不含引号)。

样例

输入 1

3
11
1805296
5567765

输出 1

4 15
114514 1919810
111234 5678999

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.