From: Kyle Schmitt Date: 2007-04-08T23:25:14+09:00 Subject: Re: [QUIZ] Getting to 100 (#119) My submission uses extreme (in)elegance ;) in accordance with this weeks quiz saying "don't think, let the computer think for you" I'm submitting several versions, one full version that includes the extra credit, and several "golf" versions Enjoy! --Kyle First we have this version #########begin########### 42 lines long elegance = nil ######################### to100 = Hash.new() @setlength=9#set, starting from 1 to use @maxops=@setlength-1#the maximum number of operators (including space) in any equation @operator = ["", "+", "-"] @oplength = @operator.length keylength = @oplength.power!(@maxops) def bogoGen() little=Array.new(@setlength+@maxops) do |i| if i.modulo(2)==0 then i=i/2 i+=1 else i=@operator[rand(@oplength)] end end return(little.join) end writingHamlet = Time.now() while to100.keys.length