Leaderboard
Showing:
Count Divisors of Factorial
Medium Accuracy: 15.21% Submissions: 3055 Points: 4

Given a number N, count total number of divisors of N!.

Examples:

Input : N = 4
Output: 8
4! is 24. Divisors of 24 are 1, 2, 3, 4, 6,
8, 12 and 24.

Input : N = 5
Output : 16
5! is 120. Divisors of 120 are 1, 2, 3, 4, 
5, 6, 8, 10, 12, 15, 20, 24 30, 40, 60 and 
120

Input : N = 6
Output : 30

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The next T lines will contain an integer N.

Output:
Corresponding to each test case, in a new line, print result in it.

Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 100

Example:
Input:
2
5
6

Output:
16
30

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Count Divisors of Factorial

Output Window