#CCBOTPBA0000048. Số cặp ước có tích n (Factor Pairs of an Integer)
Số cặp ước có tích n (Factor Pairs of an Integer)
Factor Pairs of an Integer
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a positive integer , count the pairs of positive integers satisfying and . Two pairs are distinct if at least one component differs. The reversed ordering is not counted separately; a pair with is counted once.
Input
One line contains a positive integer .
Output
Print a single integer: the number of valid pairs .
Subtasks
- Subtask 1 (20%): .
- Subtask 2 (30%): .
- Subtask 3 (50%): .
Examples
Example 1
Input:
36
Output:
5
Explanation: The pairs are , , , and . The middle pair is counted exactly once. Therefore the result is .
Example 2
Input:
1
Output:
1
Explanation: The only pair is , so the result is .
Example 3
Input:
12
Output:
3
Explanation: The three valid pairs are , and .