题目描述
Given a number n the task is to find the minimum number which is divisible by all numbers from 1 to n. Print the answer modulo (10^{9}+7).
Example 1:
Input:
n = 3
Output:
6
Explanation:
When n = 3 then the minimum number
that is divisible by all the number
till 3 is 6.
Example 2:
Input:
n = 4
Output:
12
Explanation:
When n = 4 then the minimum number
that is divisible by all the number
till 4 is 12.
Your Task:
You don't need to read input or print anything. Your task is to complete the function numGame() which takes an Integer n as input and returns the answer.
Expected Time Complexity: O(n*log(n))
Expected Auxiliary Space: O(1)
Constraints:
1 <= n <= 10^{5}
输入格式
见题面
输出格式
见题面
样例输入
n = 3
样例输出
6