-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Here is my solution ( 398 bytes ) And my solution with hex digits ( 405 bytes) Usage: 14-1.rb number* [-s size] number* Right: 14-1.rb -s 9 456456 14-1.rb 456456 -s 9 14-1.rb 4 5 64 56 -s 9 45 6456 Wrong: 14-1.rb -s9 456456 ### Dec s=$*.index("-s");s=(s ?$*.slice!(s,2)[1].to_i: 2) 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{""} i.each{|z|u=d[z*7,7] y[0]<<(u[0]<o ?e: b) y[1]<<(u[1]<o ?f: c)+a+(u[2]<o ?f: c) y[2]<<(u[3]<o ?e: b) y[3]<<(u[4]<o ?f: c)+a+(u[5]<o ?f: c) y[4]<<(u[6]<o ?e: b) y.map!{|v|v<<32}} y[1,1]*=s y[2+s,1]*=s puts y ### ### Hex s=$*.index("-s");s=(s ?$*.slice!(s,2)[1].to_i: 2) i=$*.join.split("").map{|x|x.hex} d,="7krtt1r30v/v8vyn9uw=".unpack("m")[0].unpack("B*") f=" " a,b=f*s,f+"-"*s+f c,e,o="|",a+f+f,49 y=([0]*5).map{""} i.each{|z|u=d[z*7,7] y[0]<<(u[0]<o ?e: b) y[1]<<(u[1]<o ?f: c)+a+(u[2]<o ?f: c) y[2]<<(u[3]<o ?e: b) y[3]<<(u[4]<o ?f: c)+a+(u[5]<o ?f: c) y[4]<<(u[6]<o ?e: b) y.map!{|v|v<<32}} y[1,1]*=s y[2+s,1]*=s puts y ### PS: it took me 7 minutes to write this mail because everytime I pasted the source I found another way to do it in less bytes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB4WPd5YRWfc27RzQRAmyXAJ9lEcHjbKdIGDLKZAorKDbp/W6u3QCgo2uC zsgHcCAhm7jkLJpJultYnBI= =Gk50 -----END PGP SIGNATURE-----