Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. b = "noda"
  2. c = "nutta"
  3. x = 1
  4. palindrome = []
  5. equation = []
  6.  
  7. while x < 999:
  8. x += 1
  9. for i in range(900, 1000):
  10. a = i * x
  11. b = str(a)
  12. c = b[::-1]
  13. if b == c:
  14. palindrome.append(b)
  15. equation.append(i)
  16. equation.append(x)
  17.  
  18. print palindrome[-1]
  19. print equation[-2:]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement