1  # Ruby 
   2  def find_divisors( k  )
   3    for n in 1..k
   4      s = n.to_s
   5      r = s.reverse
   6      if r[0] != 48 and r != s and s.to_i % r.to_i == 0   # 48 is ascii code for '0'
   7        puts s
   8      end
   9    end
  10  end
  11  
  12  find_divisors( 1000000 )