题目描述
Given an integer N, find the number of divisors of N that are divisible by 3.
Example 1:
Input : 6
Output: 2
Explanation: 1, 2, 3, 6 are divisors
of 6 out of which 3 and 6 are divisible
by 3.
Example 2:
Input: 10
Output: 0
Explanation: 1, 2, 5 and 10 are divisors
of 10 but none of them are divisible by 3.
Your Task:
You don't need to read or print anything. Your task is to complete the function count_divisors() which takes N as input parameter and returns count of divisor which are divisible by 3.
Expected Time Complexity: O(sqrt(N))
Expected Space Complexity: O(1)
Constraints:
1 <= N <= 10^{5}
输入格式
见题面
输出格式
见题面
样例输入
6
样例输出
2