Greatings
can anyone please explain why TLE
t=int(input())
for i in range(t):
n=int(input())
while(True):
n=n+1
#print©
c=(str(n)[::-1])
#print©
if(c==str(n)):
print©
break

  • created

    Nov '18
  • last reply

    Nov '18
  • 1

    reply

  • 798

    views

  • 2

    users

Did you notice how big K can be? You’re going to need a better algorithm.