Sample case running, test case failing

t = int(input())
for _ in range(t):
n = int(input())
if n==1:
print(’(0,1)’)
else:
n = n**(1/2)
m = (n-1)(1/2)
n = int(n)
if m>int(m):
print(’(0,{})’.format(n))
else:
a = int((m
2)-1)
b = int(2*m)
if a>b:
a,b=b,a
print(’(0,{})’.format(n),’({},{})’.format(a,b))

This is my code. I can’t figure if there are some cases which aren’t included in my code or if there is some other problem.

Please resolve my querry. I am unable to move ahead. Urgent

Try your code for the following test cases-

  1. 1
    14161
  2. 3
    0
    100
    25

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

I’m providing you with the code as the indentation in your code is not clear . If you still face any issue feel free to ask.

import math
t = int(input())
for _ in range(t):
	A = int(input())
	if (A==0):
		print("(0,0)")
		continue
	for a in range(0, int(math.sqrt(A))):
		b = math.sqrt(A-(a**2))

		if ((b-math.floor(b))==0) and a<=math.floor(b):
			b = math.floor(b)
			print(f"({a},{b})", end=' ')
	print()