PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000181. Số ước của giai thừa (Factors of Factorial)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Số ước của giai thừa (Factors of Factorial)
Factors of Factorial
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
For a positive integer , let . Count all distinct positive divisors of and print the count modulo .
Input
The input contains an integer .
Output
Print the number of positive divisors of modulo .
Subtasks
-
Subtask 1 (20 points): .
-
Subtask 2 (30 points): .
-
Subtask 3 (50 points): .
Examples
Example 1
Input
3
Output
4
Explanation
Since has divisors , the result is .
Example 2
Input
6
Output
30
Explanation
We have , giving divisors.
Example 3
Input
1000
Output
972926972
Explanation
Applying the prime-exponent divisor-count formula to and reducing modulo gives .