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.