QOJ.ac

QOJ

実行時間制限: 2 s メモリ制限: 1024 MB

#23626. Invers sum

統計

Gitt et heltall $n > 1$ og ligningen:

$$\frac{1}{n} = \frac{1}{a} + \frac{1}{b}$$

Finn to ulike positive heltall $a, b$ som begge tilfredsstiller ligningen ovenfor, og som har en minimal sum $a + b$.

Inndata

  • Den eneste linjen med inndata består av ett heltall $n$ ($1 < n \le 10^8$) — tallet på venstre side av ligningen.

Utdata

Skriv ut de beste valgene for $a$ og $b$ i stigende rekkefølge.

Eksempler

Inndata 1

4

Utdata 1

6 12

Inndata 2

107

Utdata 2

108 11556

Inndata 3

999999

Utdata 3

1998000 2002000

Inndata 4

1000000

Utdata 4

1800000 2250000

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.