QOJ.ac

QOJ

Time Limit: 0.5 s Memory Limit: 64 MB Total points: 100

#23685. 階乘

Statistics

給定一個整數 $n$ ($2 \le n \le 100000000$)。請撰寫一個程式,求出使得 $m$ 的階乘能被 $n$ 整除的最小正整數 $m$。其中,對於正整數 $m$,$m$ 的階乘是指從 $1$ 到 $m$ 的所有整數的乘積。

輸入

輸入在檔案 factorial.in 中給出。該檔案由一行組成,寫有一個整數 $n$。

輸出

程式需將結果輸出至標準輸出。請輸出僅包含整數 $m$ 的一行。

範例

輸入 1

10

輸出 1

5

輸入 2

12

輸出 2

4

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.