#abc280d. D - Factorial and Multiple
D - Factorial and Multiple
Score : points
问题描述
给定一个大于等于2的整数 。
求最小的正整数 ,使得 是 的倍数。
此处, 表示 的阶乘。在本问题的约束条件下,可以证明这样的 总是存在。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given an integer greater than or equal to .
Find the minimum positive integer such that is a multiple of .
Here, denotes the factorial of . Under the Constraints of this problem, we can prove that such an always exists.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print the minimum positive integer such that is a multiple of .
Sample Input 1
30
Sample Output 1
5
Therefore, is the minimum positive integer such that is a multiple of . Thus, should be printed.
Sample Input 2
123456789011
Sample Output 2
123456789011
Sample Input 3
280
Sample Output 3
7
update @ 2024/3/10 11:46:11