Killing Christopher
Practice
0 (0 votes)
Easy
Problem
67% Success 1052 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

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

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
Tags:
EasySimple-math
Points:20
7 votes
Tags:
Ad-HocMathematicsOpenApprovedEasy
Points:20
132 votes
Tags:
ReadyMathematicsOpenApprovedEasyMathamatics