Killing Christopher

0

0 votes
Easy
Problem

Walter is a drug dealer.He deals with Christopher who is very bad.One day Walter and Jessy made a plan to kill Christopher.To kill Christopher they went to Abul.Abul gave a puzzle to Walter to solve then only he will help them to kill Christopher. The problem states that you are given a integral Number N.Then Abul asks Walter to determine the number of ways in which it can be written as the sum of two squares of non -negative numbers.As Walter is a chemist and he is not very good at maths he asks Jessy's help.Help Jessy to solve the problem.
INPUT:
The first line of Input contains an integer T denoting the number of test cases.
Next each of the T lines contain one integer N.
OUTPUT:
For each N determine the number of ways in which N can be written as the sum of two squares.
NOTE:Only consider the square of non-negative integers.

Constraints
1 <= T <= 200
0 <= N <= 10^12
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?