CF1269A.Equation
入门
通过率:0%
时间限制:3.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Let's call a positive integer composite if it has at least one divisor other than 1 and itself. For example:
- the following numbers are composite: 1024, 4, 6, 9;
- the following numbers are not composite: 13, 1, 2, 3, 37.
You are given a positive integer n. Find two composite integers a,b such that a−b=n.
It can be proven that solution always exists.
我们称一个正整数为合数,如果它除了 1 和它自身外,至少还有一个其他正因数。例如:
- 以下数字是合数:1024、4、6、9;
- 以下数字不是合数:13、1、2、3、37。
给定一个正整数 n,请找出两个合数 a 和 b,使得 a−b=n。
可以证明,这样的解总是存在。
输入格式
The input contains one integer n (1≤n≤107): the given integer.
输入包含一个整数 n(1≤n≤107):给定的整数。
输出格式
Print two composite integers a,b (2≤a,b≤109,a−b=n).
It can be proven, that solution always exists.
If there are several possible solutions, you can print any.
输出两个合数 a 和 b(满足 2≤a,b≤109,且 a−b=n)。
可以证明,解一定存在。
如果有多种可能的解,输出任意一个即可。
输入输出样例
输入#1
1
输出#1
9 8
输入#2
512
输出#2
4608 4096
输入解题思路,AI测评打分。不知道怎么写?