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 ≤ 10^{12}

Difficulty: EASY
Tags: Mathematics
Expected Time Complexity: O(sqrt(N))
Expected Auxiliary Space: O(1)

Starter code:
#User function Template for python3

class Solution:
    def squareFactor(self, N):
        # code here

Solutions:
class Solution:

	def squareFactor(self, N):
		s = 0
		for i in range(1, int(N ** 0.5) + 1):
			if N % (i * i) == 0:
				s = s + 1
		return s


import math

class Solution:

	def checkPerfectSquare(n):
		sw = int(math.sqrt(n))
		if sw * sw == n:
			return 1
		return 0

	def squareFactor(self, N):
		count = 0
		for i in range(1, int(math.sqrt(N)) + 1):
			if N % i == 0:
				if Solution.checkPerfectSquare(i):
					count += 1
				if Solution.checkPerfectSquare(N // i) and i * i != N:
					count += 1
		return count


import math

class Solution:

	def squareFactor(self, N):
		c = 0
		for i in range(1, int(math.sqrt(N)) + 1):
			if N % (i * i) == 0:
				c += 1
		return c


class Solution:

	def squareFactor(self, n):
		cc = 0
		for i in range(1, int(n ** 0.5) + 1):
			if n % (i * i) == 0:
				cc += 1
		return cc


class Solution:

	def squareFactor(self, N):
		count = 0
		for i in range(1, int(pow(N, 0.5)) + 1):
			if N % i ** 2 == 0:
				count += 1
		return count


class Solution:

	def squareFactor(self, N):
		counter = 0
		for i in range(1, N + 1):
			if i * i < N + 1:
				if N % (i * i) == 0:
					counter += 1
			else:
				break
		return counter


import math

class Solution:

	def squareFactor(self, N):
		count = 0
		n = int(math.sqrt(N))
		for i in range(1, n + 1):
			if N % i ** 2 == 0:
				count += 1
		return count


class Solution:

	def squareFactor(self, N):
		c = 0
		for i in range(1, N + 1):
			if i * i > N:
				break
			elif N % (i * i) == 0:
				c += 1
		return c


class Solution:

	def squareFactor(self, N):
		count = 0
		i = 1
		while i * i <= N:
			if N % (i * i) == 0:
				count += 1
			i += 1
		return count


def binary_square(x):
	si = 0
	ei = x
	ans = -1
	while si <= ei:
		mid = (si + ei) // 2
		if mid * mid == x:
			return mid
		elif mid * mid < x:
			ans = mid
			si = mid + 1
		else:
			ei = mid - 1
	return ans

class Solution:

	def squareFactor(self, N):
		count = 0
		n = binary_square(N)
		for i in range(1, n + 1):
			if N % i ** 2 == 0:
				count += 1
		return count


class Solution:

	def squareFactor(self, N):
		count = 0
		for i in range(1, int(N ** (1 / 2)) + 1):
			i = i * i
			if i <= N and N % i == 0:
				count = count + 1
			elif i > N:
				break
		return count


import math

class Solution:

	def squareFactor(self, N):
		count = 0
		for x in range(1, int(math.sqrt(N)) + 1):
			if N % (x * x) == 0:
				count += 1
		return count


import math

class Solution:

	def squareFactor(self, N):
		sum = 1
		for i in range(2, int(math.sqrt(N)) + 1):
			if not N % i ** 2:
				sum += 1
		return sum


import math

class Solution:

	def squareFactor(self, N):
		c = 1
		for i in range(2, int(N ** 0.5) + 1):
			if not N % i ** 2:
				c += 1
		return c


import math as m

class Solution:

	def squareFactor(self, N):
		x = 0
		for i in range(1, int(N ** 0.5) + 1):
			if N % (i * i) == 0:
				x += 1
		return x
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.squareFactor(N))


import math

class Solution:

	def squareFactor(self, N):
		s = 1
		for i in range(2, int(math.sqrt(N)) + 1):
			if not N % i ** 2:
				s += 1
		return s
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.squareFactor(N))


class Solution:

	def squareFactor(self, N):
		count = 0
		n = int(N ** 0.5)
		for i in range(1, n + 1):
			if N % i ** 2 == 0:
				count += 1
		return count
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.squareFactor(N))


import math

class Solution:

	def squareFactor(self, N):
		c = 0
		z = int(math.sqrt(N))
		for i in range(1, z + 1):
			if N % (i * i) == 0:
				c += 1
		return c
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.squareFactor(N))


class Solution:

	def squareFactor(self, N):
		c = 1
		d = 0
		while c * c <= N:
			if N % (c * c) == 0:
				d += 1
			c += 1
		return d
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.squareFactor(N))


class Solution:

	def squareFactor(self, N):
		i = 1
		temp = i
		l = []
		while temp <= N:
			l.append(temp)
			i += 1
			temp = i * i
		count = 0
		for x in l:
			if N % x == 0:
				count += 1
		return count


from math import *

class Solution:

	def squareFactor(self, N):
		s = 1
		for i in range(2, int(sqrt(N)) + 1):
			if N % (i * i) == 0:
				s += 1
		return s


class Solution:

	def squareFactor(self, N):
		i = 1
		result = 0
		while i * i <= N:
			if not N % (i * i):
				result += 1
			i += 1
		return result


import math

class Solution:

	def squareFactor(self, N):
		count = 0
		i = 1
		while i <= math.sqrt(N):
			if N % (i * i) == 0:
				count += 1
			i += 1
		return count


import math

class Solution:

	def squareFactor(self, N):
		c = 0
		m = 1
		while m * m <= N:
			if N % (m * m) == 0:
				c += 1
				m += 1
			else:
				m += 1
		return c


class Solution:

	def squareFactor(self, N):
		w = int(pow(N, 0.5))
		c = 0
		for i in range(1, w + 1):
			if N % (i * i) == 0:
				c = c + 1
		return c


class Solution:

	def squareFactor(self, N):
		lis = []
		i = 1
		while i * i <= N:
			if N % (i * i) == 0:
				lis.append(i * i)
			i += 1
		return len(lis)


import math

class Solution:

	def squareFactor(self, N):
		total = 0
		i = 1
		while i * i <= N:
			if N % (i * i) == 0:
				total += 1
			i += 1
		return total


def factors(x):
	result = []
	i = 1
	while i * i <= x:
		if x % i == 0:
			result.append(i)
			if x // i != i:
				result.append(x // i)
		i += 1
	return result
import math

def sq(n):
	j = math.sqrt(n)
	k = int(j)
	if n == k * k:
		return 'true'
	else:
		return 'false'

class Solution:

	def squareFactor(self, N):
		s = 0
		o = factors(N)
		for i in o:
			if sq(i) == 'true':
				s = s + 1
		return s


class Solution:

	def squareFactor(self, N):
		c = 0
		s = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296]
		for i in s:
			if N % i == 0:
				c += 1
			else:
				continue
		return c


import math

class Solution:

	def squareFactor(self, N):
		sum = 0
		for num in range(1, int(math.sqrt(N)) + 1):
			if N % (num * num) == 0:
				sum += 1
		return sum