鹿島建設プログラミングコンテスト2020 (AtCoder Regular Contest 110)
A
Redundant Redundancy
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

We have an integer $N$.

翻译中…

Print an integer $x$ between $N$ and $10^{13}$ (inclusive) such that, for every integer $y$ between $2$ and $N$ (inclusive), the remainder when $x$ is divided by $y$ is $1$.

翻译中…

Under the constraints of this problem, there is always at least one such integer $x$.

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $2 \leq N \leq 30$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

Print an integer $x$ between $N$ and $10^{13}$ (inclusive) such that, for every integer $y$ between $2$ and $N$ (inclusive), the remainder when $x$ is divided by $y$ is $1$.

翻译中…

If there are multiple such integers, any of them will be accepted.

翻译中…

样例

Input #1
3
Output #1
7
The remainder when $7$ is divided by $2$ is $1$, and the remainder when $7$ is divided by $3$ is $1$, too. $7$ is an integer between $3$ and $10^{13}$, so this is a desirable output.
Input #2
10
Output #2
39916801
题目信息
题号
arc110_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。