fork(1) download
  1. def isPal(n):
  2. r=0
  3. nn=n
  4. while (n>0):
  5. k=n%10
  6. r=r*10+k
  7. n=n//10
  8. return r==nn
  9.  
  10. p=int(input())
  11. if isPal(p):
  12. print("Да")
  13. else:
  14. print("Нет")
  15.  
Success #stdin #stdout 0.02s 27704KB
stdin
1
stdout
Да