I got correct answer in one of the test case. But got stuck in the second test case. Dont know what I am missing. Pls help
GETTING WRONG ANSWER, PLEASE GIVE SOME HINT
Hey @varshneynishu2017, you need to upload your code on google drive and share the link with me so that I can have a look at your code. Only then will I be able to help you !
Thanks !
import math
t=int(input())
while(t):
a=int(input())
b=math.sqrt(a)
c=int(b)
for i in range(0,c):
e=math.sqrt(a-ii)
temp=int(e)
if((temptemp+i*i)==a and temp>=i):
print("(",i,",",temp,")",sep="",end=" ")
print()
t=t-1
For Ide link:
Hey @varshneynishu2017, I checked your code. So if a test case is like :
3
0
100
25
The output of the above input should be :
(0,0)
(0,10) (6,8)
(0,5) (3,4)
Whereas your code gives an output like this :
(0,10) (6,8)
(0,5) (3,4)
So please modify your code to pass this test case and your code would be working fine then !
I hope this clears your doubt !
Please mark the doubt as resolved in your doubts section
Happy Learning !
Thank you very much, I still miss the boundary test cases. Will work on them