PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000107. Đếm số có đúng n ước (n-divisors)
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ó đúng n ước (n-divisors)
n-divisors
Source: SPOJ
Version: Phuoc Hung OJ Extended
Problem Statement
For a positive integer , let be its number of positive divisors, including and itself. For example, , , and . Given , count the integers satisfying .
Input
One line contains three integers , where is the required divisor count.
Output
Print one integer: the count of with exactly positive divisors.
Subtasks
- Subtask 1 (20 points): ; ; .
- Subtask 2 (30 points): ; ; .
- Subtask 3 (50 points): ; ; .
Examples
Input
1 7 2
Output
4
Explanation
In , exactly have two positive divisors. The number has one; and have three and four respectively. Thus the answer is .