how can i resolve this time limit exceed problem… this is my code. what is that thing which takes much of time and how can I resolve this problem?
N=int(input())
l=[int(input()) for i in range(N)]
for no in l:
ans=[]
for a in range(0,no+1):
s=[(a,b) for b in range(0, no+1) if (a2 + b2 ==no and a<=b)]
if len(s)==0:
pass
else:
ans.append((*s))
print(*s)
for i in range(len(l)):
l[i]=(s)
for i in l:
print(i)