All Tracks Math Problem

Killing Christopher
/
No tags
Problem
Editorial
Analytics

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
SAMPLE INPUT
3
13
94
28
SAMPLE OUTPUT
1
0
0
Time Limit: 1,0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

Best Submission

Similar Problems

Contributors

This Problem was Asked in

Initializing Code Editor...
Уведомления
View All Notifications

?