Universal Cup Judging System

Universal Cup

حد الوقت: 2.0 s حد الذاكرة: 1024 MB مجموع النقاط: 100
الإحصائيات

Foammm は以下の問題を作成した。

Coprime Problem

2つの正の整数 $x$ と $y$ が与えられる。以下の4つの操作を、それぞれコスト1で何度でも行うことができる。

  • $x$ に 1 を加える。
  • $y$ に 1 を加える。
  • $x$ から 1 を引く。
  • $y$ から 1 を引く。

これら2つの整数が 1 より大きい公約数を持たないようにするための最小の合計コストを求めよ。

Foammm はこの問題のテストケースを作成する必要がある。彼女が整数 $k$ を与えるので、上記の問題の答えがちょうど $k$ となるような2つの正の整数 $x$ と $y$ を求めよ。

入力

各テストファイルにはテストケースが1つだけ含まれる。 1行目には整数 $k$ ($0 \le k \le 20$) が与えられる。

出力

1行目に整数 $x$ ($0 < x < 10^{1500}$) を、2行目に整数 $y$ ($0 < y < 10^{1500}$) を出力せよ。

答えは必ず存在することが示せる。複数の有効な答えが存在する場合は、そのうちのどれを出力してもよい。

入出力例

入力 1

0

出力 1

1
1

入力 2

1

出力 2

2
2

入力 3

2

出力 3

945
1210

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.