On Mon, Apr 15, 2013 at 2:53 PM, Hyun Oh K. <lists / ruby-forum.com> wrote:

> OMG! this is the simplest way!
> Thank you!
> Very simple... beautiful!
>

That's Ruby. :-)

Here's another one
- just for fun

irb(main):003:0> 100.times {|a| s = (a * a).to_s; puts a, s if 2.times.all?
{|i| s[2*i] == s[2*i+1]} }
88
7744
=> 100

;-)

Cheers

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/