http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4099

题意:找到两个数x,y使得满足x+n=y,并且x,y都是合数

题解:构造

1、特判n==1时;

2、任何数*2肯定合数,+n就是3*n,也肯定合数;

/*
*@Author:   STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=1000000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
ll t,n,m,k,p,l,r,u,v;
int ans,cnt,flag,temp,sum;
int a[N];
char str;
struct node{};int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);scanf("%lld",&t);while(t--){scanf("%lld",&n);if(n==1){cout<<9<<" "<<10<<endl;continue;}cout<<2*n<<" "<<3*n<<endl;}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}

Extended Twin Composite Number相关推荐

  1. Extended Twin Composite Number 思维题

    Do you know the twin prime conjecture? Two primes a and b are called twin primes if a+2=b. The twin ...

  2. 质数(prime number)又称素数,有无限个。质数定义为在大于1的自然数中,除了1和它本身以外不再有其他因数的数称为质数。合数(Composite number)是与质数对应的概念,在大于1

    #include<bits/stdc++.h> using namespace std; int main() {     int x,flag=0;     cin>>x; ...

  3. The 19th Zhejiang University Programming Contest Sponsored by TuSimple

    Problem A Thanks, TuSimple! 比赛地址:http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5 ...

  4. UVa 10066 Twin Towers (DP 最长公共子序列)

    题意  求两串数字最长公共子序列的长度 裸的lcs没啥说的 #include<cstdio> #include<cstring> #include<algorithm&g ...

  5. 陈景润定理不是谎言的证据列表

    近年来,在反动文人王晓明的蛊惑下,国内出现一股反陈景润定理的"小高潮",搅得陈景润在天之灵不得安息. 现将陈景润定理不是谎言的证据列表(部分)放在本文附件之中,请大家参阅. 袁萌 ...

  6. Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2)

    一场挺简单的CF,但是我打炸了啊 A. Search for Pretty Integers time limit per test 1 second memory limit per test 25 ...

  7. integer加1_AP双语数学常用的术语(1)

    "语言就是思维."我总是宣扬这个观点,要求学生记住基本的术语表述.名字晓得什么意思了,其数学理论也多少认识了.我会陆续把整理的一些常用的词汇发布,尤其是近期需要参加数学补考的同学. ...

  8. 13行代码AC_Justifying the Conjecture Gym - 102394J(解题报告)

    励志用少的代码做高效表达 题干 Problem Description The great mathematician DreamGrid proposes a conjecture, which s ...

  9. 数学--数论--HDU - 6322 打表找规律

    In number theory, Euler's totient function φ(n) counts the positive integers up to a given integer n ...

最新文章

  1. [Golang学习笔记] 05 程序实体2 作用域访问权限和变量重声明
  2. 北邮OJ 1005. 16校赛-Hawei Learning C
  3. 在Java 8之前的项目中使用JUnit 5
  4. python关于字符串的内置函数_Python 字符串内置函数(二)
  5. Ceres Solver安装
  6. Visual C++ 2008入门经典 第九章类的继承和虚函数(二)
  7. 校招刷题---java选择题笔记03
  8. 【luogu3834】【模板】可持久化线段树 2(主席树),静态区间第K小值
  9. mysql longtext 查询_mysql,_mysql中longtext存在大量数据时,会导致查询很慢?,mysql - phpStudy...
  10. swiper设置autoplay不起作用
  11. linux制作deepin启动盘制作工具,深度启动盘制作工具(Deepin Boot Maker)下载_深度启动盘制作工具(Deepin Boot Maker)官方下载-太平洋下载中心...
  12. js 将图片置灰_让网页图片变灰色的三种方法
  13. 小黄的刷题之路(十六)——五行魔法(枚举/蛮力法)
  14. 顶配梧桐树金玉满堂增额终身寿险,对抗“资产荒”的高增长神器
  15. scala中 sorted,sortBy,sortWith语法使用
  16. mysql存储过程出参和入参_数据库mysql存储中的入参出参理解
  17. java 对 Map的遍历
  18. windows10怎么配置二个或多个JDK版本_详细图解
  19. python金融量化分析 | 闲杂笔记
  20. Windows模拟器推荐

热门文章

  1. openresty模板html页面,openresty 中使用lua 的页面模板类库template来渲染页面
  2. php 值不进行解码,无法解码PHP中的JSON值
  3. jquery ajax html方法吗,jQuery ajax方法
  4. 游戏使用html签名,关于玩游戏的个性签名
  5. mysql帐户权限replace_mysql 用户管理和权限设置
  6. babel css3新特性_2018年面试前端总结
  7. java string
  8. 云大计算机专业录取分数线,2016年云南大学艺术类专业录取分数线
  9. java控制器接收请求参数_SpringMVC之接收请求参数和页面传参
  10. can协议crc计算_CAN总线的升级版——CAN FD简介