首页 技术 正文
技术 2022年11月10日
0 收藏 371 点赞 4,855 浏览 1432 个字

Do you know the twin prime conjecture? Two primes  and  are called twin primes if . The twin prime conjecture is an unsolved problem in mathematics, which asks for a proof or a disproof for the statement “there are infinitely many twin primes”.

On April 17, 2013, Yitang Zhang announced a proof that for some integer  that is less than 70 million, there are infinitely many pairs of primes that differ by . As of April 14, 2014, one year after Zhang’s announcement, the bound has been reduced to 246. People are hoping for the bound to be smaller and smaller, so that a proof for the conjecture can finally be found.

For our dear contestants, we’ve prepared another similar problem for you, which is the extended twin composite number problem: Given a positive integer , find two integers  and  such that  and both  and  are composite numbers.

Input

There are multiple test cases. The first line of the input contains an integer  (about ), indicating the number of test cases. For each test case:

The only line contains one integer  ().

Output

For each test case output two integers in one line, indicating  and  where . If there are multiple valid answers, you can print any of them; If there is no valid answer, output “-1” (without quotes) instead.

Sample Input

3
11
1805296
5567765

Sample Output

4 15
114514 1919810
111234 5678999

Author: JIN, Mengge
Source: The 19th Zhejiang University Programming Contest Sponsored by TuSimple


水题,特别能迷惑人。

代码:

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>using namespace std;int main() {
int t,n;
scanf("%d",&t);
while(t --) {
scanf("%d",&n);
if(n == ) printf("%lld %lld\n",,);
else printf("%lld %lld\n",n * 2ll,n * 3ll);
}
}
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,495
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,909
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,741
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,496
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,134
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,298