Killing Christopher
Tag(s):

## Easy

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
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Swift-4.1, TypeScript, Visual Basic

## CODE EDITOR

Initializing Code Editor...

## This Problem was Asked in

Challenge Name

ALGOMANIAC PRELIMS

OTHER PROBLEMS OF THIS CHALLENGE
• Data Structures > Advanced Data Structures
• Math > Number Theory
Уведомления

?