From: Jannis Harder Date: 2005-01-10T06:39:34+09:00 Subject: Re: [SOLUTION] Ruby Quiz #14 LCD Numbers ( solution #2 ) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Florian Gross schrieb: | email55555 email55555 wrote: | |> Thanks Jannis Harder found the bug. It is still 349 bytes |> program: ( the bug is on "u[x==1?2:5]<0", it should be |> "u[x==1?2:5] |> s=$*.index("-s");s=(s ?$*.slice!(s,2)[1].to_i: 2) | | | Why the spaces? Why the parentheses? s=$*.index | "-s";s=s?$*.slice!(s,2)[1].to_i:2 spaces: ~ syntax error without " " paranthese: ~ no reasen ;) |> i=$*.join.split("").map{|x|x.to_i} |> d,="7krtt1r30v/s".unpack("m")[0].unpack("B*") f=" " |> a,b=f*s,f+"-"*s+f c,e,o="|",a+f+f,49 y=([0]*5).map{""} | | | y=(1..5).map{""} | |> i.each{|z|u=d[z*7,7] | | | i.map .each_byte is shorter |> 3.times{|x|y[x*2]<<(u[x*3] [1,3].each{|x|y[x]<<(u[x==1?1:4] ?f:c)<