Square Divisors
Basic Accuracy: 80.85% Submissions: 1845 Points: 1

Given a number N.Your task is to print the no of divisors of number N which are perfect squares.

Example 1:

Input: 36
Output: 4
Explaination: The factors which are perfect 
square are 1, 4, 9 and 36.

Example 2:

Input: 60
Output: 2
Explaination: The factors which are perfect 
squares are 1 and 4.

Your Task:
You do not need to read input or print anything. Your task is to complete the function squareFactor() which takes N as input parameter and returns the count of the factors which are perfect squares.

Expected Time Complexity: O(sqrt(N))
Expected Auxiliary Space: O(1)

Constraints:
1 ≤ N ≤ 1012  

We are replacing the old Disqus forum with the new Discussions section given below.
Click here to view old Disqus comments.


to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Square Divisors

Output Window