PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000209. Đếm số ước của giai thừa (Divisors 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
Đếm số ước của giai thừa (Divisors of Factorial)
Divisors of Factorial
Source: SPOJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a nonnegative integer , count the positive divisors of , with . Since the answer may be very large, output it modulo .
Two divisors are distinct if they have different integer values. For example, has the eight divisors .
Input
The only line contains the integer .
Output
Print the number of positive divisors of modulo .
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
4
Output
8
Explanation
. We may choose the exponent of from and that of from . Thus there are positive divisors, unchanged modulo .