[BangPypers] SPOJ : PALIN problem ...

Avinash avinash.s at paladion.net
Tue Nov 11 11:53:36 CET 2014


​Hi pals,
I need littele help ..
I made a program as per the given discription in the problem
but when I submit it , Spoj is not accepting it .
Can anyone tell me where I am doing wrong !

here is the problem set:
http://www.spoj.com/problems/PALIN/


and here is my solution:
​​N=int(raw_input())
if N>0:
    for i in range(0,N):
        IN=(raw_input())
        if(int(IN)>=0 and int(IN)<1000000):

                while(True):
                    IN=int(IN)+1
                    IN=str(IN)
                    RIN=reversed(IN)
                    if(list(IN)==list(RIN)):
                        print IN
                        break
​

--


More information about the BangPypers mailing list