On Tue, Feb 26, 2013 at 9:39 PM, Henry Maddocks <[email protected]> wrote: > > On 27/02/2013, at 7:48 AM, Bartosz DziewoĆski <[email protected]> wrote: > >> Best I could do on short notice: >> >> gcd=->(_){_.sort_by(&:-@).inject{|p,q|q.nonzero?&&gcd[[q,p-q]]||--p}} >> $/=' ';gets;puts gcd[[$_,gets].map &(method :Integer)] > > LOL
Yes, it's beatiful! Thank you Bartosz! Even the most obvious spoonfeeding thread can turn into beauty and art. Isn't that amazing? Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- [email protected] | https://groups.google.com/d/forum/ruby-talk-google?hl=en --- You received this message because you are subscribed to the Google Groups "ruby-talk-google" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
