QOJ.ac

QOJ

حد الوقت: 2 s حد الذاكرة: 1024 MB

#23626. مجموع المقلوبات

الإحصائيات

بالنظر إلى عدد صحيح $n > 1$، والمعادلة:

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

أوجد عددين صحيحين موجبين مختلفين $a, b$ يحققان المعادلة أعلاه، ولهما أصغر مجموع ممكن $a + b$.

الإدخال

  • يتكون السطر الوحيد من الإدخال من عدد صحيح واحد $n$ ($1 < n \le 10^8$) — وهو العدد الموجود في الطرف الأيسر من المعادلة.

الإخراج

اطبع أفضل خيارين للعددين $a$ و $b$ بترتيب تصاعدي.

أمثلة

الإدخال 1

4

الإخراج 1

6 12

الإدخال 2

107

الإخراج 2

108 11556

الإدخال 3

999999

الإخراج 3

1998000 2002000

الإدخال 4

1000000

الإخراج 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.