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 11 and itself. For example:

  • the following numbers are composite: 10241024, 44, 66, 99;
  • the following numbers are not composite: 1313, 11, 22, 33, 3737.

You are given a positive integer nn. Find two composite integers a,ba,b such that a−b=na-b=n.

It can be proven that solution always exists.

我们称一个正整数为合数,如果它除了 11 和它自身外,至少还有一个其他正因数。例如:

  • 以下数字是合数:10241024、44、66、99;
  • 以下数字不是合数:1313、11、22、33、3737。

给定一个正整数 nn,请找出两个合数 aa 和 bb,使得 a−b=na - b = n。

可以证明,这样的解总是存在。

输入格式

The input contains one integer nn (1≤n≤1071 \leq n \leq 10^7): the given integer.

输入包含一个整数 nn(1≤n≤1071 \leq n \leq 10^7):给定的整数。

输出格式

Print two composite integers a,ba,b (2≤a,b≤109,a−b=n2 \leq a, b \leq 10^9, a-b=n).

It can be proven, that solution always exists.

If there are several possible solutions, you can print any.

输出两个合数 aa 和 bb(满足 2≤a,b≤1092 \leq a, b \leq 10^9,且 a−b=na - b = n)。

可以证明,解一定存在。

如果有多种可能的解,输出任意一个即可。

输入输出样例

  • 输入#1

    1

    输出#1

    9 8
  • 输入#2

    512

    输出#2

    4608 4096

输入解题思路,AI测评打分。不知道怎么写?

首页