Please enter your email address or userHandle.
Given an integer N, find the number of divisors of N that are divisible by 3.
Input : 6
Explanation: 1, 2, 3, 6 are divisors
of 6 out of which 3 and 6 are divisible
Explanation: 1, 2, 5 and 10 are divisors
of 10 but none of them are divisible by 3.
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)
1 <= N <= 105
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.