P14397 [GeeksforGeeks] No of factors of n4833
普及-
题目描述

Given a positive integer N, find the number of factors in N! ( N factorial).
Example :
Input:
N = 5
Output:
16
Explanation:
5! is 120 and the number of factors of
120 are 1 2 3 4 5 6 8 10 12 15 20 24 30
40 60 120 So the number of factors are 16.
Example 2:
Input:
N = 4
Output:
8
Explanation:
4! is 24 and the number of factors of
24 are 1 2 3 4 6 8 12 24
So the number of factors are 8.

Your Task:
You don't need to read input or print anything. Your task is to complete the function factorsOfFactorial() which takes an integer N as an input parameter and return the number of factors of N factorial.
Expected Time Complexity: O(NLogLogN)
Expected Auxiliary Space: O(N)
Constraints:
1 <= N <= 100

输入格式

见题面

输出格式

见题面

样例输入
N = 5
样例输出
16