my code works in ideone but gives tle… help me reduce the runtime. I have used a single loop still it gives tle…
x=int(input())
b=[]*x
for i in range(0,x,1):
c=int(input())
if(c<=1000000 and c>=0):
b.append(c)
print("")
for j in range(0,x,1):
a=b[j]
f=a
e=False
while(e!=True):
f=f+1
e=True
l=0
a=str(f)
u=len(a)
l=int(u/2)
t=a[:l]
s=a[-(l):]
if(t!= s):
e=False
if(e==True):
print(a)