Given a circle of radius R in 2-D with origin of (0, 0) as center. The task is to find the total lattice points on circumference. Lattice Points are points with coordinates as integers in 2-D space.
Input: R = 5
Below are lattice points on a circle with radius 5 and origin as (0, 0). (0,5), (0,-5), (5,0), (-5,0), (3,4), (-3,4), (-3,-4), (3,-4), (4,3), (-4,3), (-4,-3), (4,-3). Total 12 lattice points.
The first line of input contains T denoting the no. of test cases . Then T test cases follow . The first line of each test case contains an Integer R which will be the radius of the circle.
For each test case output the required result in a new line.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.