zoj4099(思维)

本文探讨了数学中未解决的问题——无限复合双数猜想,类似于孪生素数猜想,但聚焦于寻找无限对复合数,其差为固定值。文章提供了一个编程解决方案,通过将输入整数分别乘以8和9来生成一对复合数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Extended Twin Composite Number
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

以后遇到special judge一定要有奇奇怪怪的想法!!
!!!防止看到题解都很懵逼
至于为啥乘以8和9,因为8,9是最小的两个相差一的合数,不用给1加特判啦

#include<bits/stdc++.h>
using namespace std;
int main()
{
 int t;
 scanf("%d",&t);
 while(t--)
    {
  long long temp;
  scanf("%lld",&temp);
  long long x=temp*8;
  long long y=temp*9;
  printf("%lld %lld\n",x,y);
 }
    return 0;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值