------art_11504_7986009.1151311733991
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

My solution does have one aspect I haven't noticed in everyone's great
submissions so it might be illustrative, if nothing else - I wrote my
implementation test first.  Other than that, there isn't too much
novelty in my solution.

Sean Carley
http://sean-carley.blogspot.com/

------art_11504_7986009.1151311733991
Content-Type: text/x-ruby-script; name=test_pascal.rb; 
	charset سContent-Transfer-Encoding: base64
X-Attachment-Id: f_4b1bv7
Content-Disposition: attachment; filename="test_pascal.rb"

cmVxdWlyZSAndGVzdC91bml0JwpyZXF1aXJlICdwYXNjYWwnCgpjbGFzcyBUZXN0UGFzY2FsIDwg
VGVzdDo6VW5pdDo6VGVzdENhc2UKICBkZWYgdGVzdF9jbGFzc19leGlzdHMKICAgIGFzc2VydF9r
aW5kX29mIENsYXNzLCBQYXNjYWwKICBlbmQKICAKICBkZWYgdGVzdF9udGhfcm93X29mXzEKICAg
IGFzc2VydF9lcXVhbCBbMV0sIFBhc2NhbC5udGhfcm93KDEpCiAgZW5kCiAgCiAgZGVmIHRlc3Rf
bnRoX3Jvd18yCiAgICBhc3NlcnRfZXF1YWwgWzEsMV0sIFBhc2NhbC5udGhfcm93KDIpCiAgZW5k
CiAgCiAgZGVmIHRlc3RfbnRoX3Jvd18zCiAgICBhc3NlcnRfZXF1YWwgWzEsMiwxXSwgUGFzY2Fs
Lm50aF9yb3coMykKICBlbmQKICAKICBkZWYgdGVzdF9udGhfcm93XzQKICAgIGFzc2VydF9lcXVh
bCBbMSwzLDMsMV0sIFBhc2NhbC5udGhfcm93KDQpCiAgZW5kCiAgCiAgZGVmIHRlc3RfZm9ybWF0
X3Jvd3NfdXB0b18xCiAgICBhc3NlcnRfZXF1YWwgIjEiLCBQYXNjYWwuZm9ybWF0X3Jvd3NfdXB0
bygxKQogIGVuZAogIAogIGRlZiB0ZXN0X2Zvcm1hdF9yb3dzX3VwdG9fMgogICAgYXNzZXJ0X2Vx
dWFsICIgMSBcbjEgMSIsIFBhc2NhbC5mb3JtYXRfcm93c191cHRvKDIpCiAgZW5kCiAgCiAgZGVm
IHRlc3RfZm9ybWF0X3Jvd3NfdXB0b18zCiAgICBhc3NlcnRfZXF1YWwgIiAgMSAgXG4gMSAxIFxu
MSAyIDEiLCBQYXNjYWwuZm9ybWF0X3Jvd3NfdXB0bygzKQogIGVuZAogIAogIGRlZiB0ZXN0X2Zv
cm1hdF9yb3dzX3VwdG9fNgogICAgYXNzZXJ0X2VxdWFsICIgICAgICAgICAgMSAgICAgICAgICAg
XG4gICAgICAgIDEgICAxICAgICAgICAgXG4gICAgICAxICAgMiAgIDEgICAgICAgXG4gICAgMSAg
IDMgICAzICAgMSAgICAgXG4gIDEgICA0ICAgNiAgIDQgICAxICAgXG4xICAgNSAgIDEwICAxMCAg
NSAgIDEgIiwgUGFzY2FsLmZvcm1hdF9yb3dzX3VwdG8oNikKICBlbmQKICAKICBkZWYgdGVzdF9l
bGVtZW50X3dpZHRoX3Jvd18xCiAgICBhc3NlcnRfZXF1YWwgMSwgUGFzY2FsLmVsZW1lbnRfd2lk
dGgoMSkKICBlbmQKICAKICBkZWYgdGVzdF9lbGVtZW50X3dpZHRoX3Jvd182CiAgICBhc3NlcnRf
ZXF1YWwgMiwgUGFzY2FsLmVsZW1lbnRfd2lkdGgoNikKICBlbmQKICAKICBkZWYgdGVzdF9lbGVt
ZW50X3dpZHRoX3Jvd18xMAogICAgYXNzZXJ0X2VxdWFsIDMsIFBhc2NhbC5lbGVtZW50X3dpZHRo
KDEwKQogIGVuZAplbmQ------art_11504_7986009.1151311733991
Content-Type: text/x-ruby-script; name=pascal.rb; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_4b1fwi
Content-Disposition: attachment; filename="pascal.rb"

Y2xhc3MgUGFzY2FsCiAgZGVmIHNlbGYubnRoX3JvdyhuKQogICAgY2FzZSBuCiAgICB3aGVuIDEK
ICAgICAgWzFdCiAgICBlbHNlCiAgICAgIG5fbWludXNfMSA9IFswXS5jb25jYXQobnRoX3Jvdyhu
LTEpKS5jb25jYXQoWzBdKQogICAgICAKICAgICAgcm93ID0gW10KICAgICAgCiAgICAgIGZvciBp
IGluIDAuLi5uX21pbnVzXzEubGVuZ3RoLTEKICAgICAgICByb3cgPDwgbl9taW51c18xW2ldICsg
bl9taW51c18xW2krMV0KICAgICAgZW5kCiAgICAgIAogICAgICByb3cKICAgIGVuZAogIGVuZAog
IAogIGRlZiBzZWxmLmZvcm1hdF9yb3dzX3VwdG8obikKICAgIHJvd3MgPSBbXQogICAgZm9yIGkg
aW4gMS4ubgogICAgICByb3dzIDw8IGZvcm1hdF9yb3coaSwgZWxlbWVudF93aWR0aChuKSkKICAg
IGVuZAogICAgcm93X3dpZHRoID0gcm93cy5sYXN0LnNpemUKICAgIHJvd3MuY29sbGVjdCB7IHxy
b3d8IHJvdy5jZW50ZXIgcm93X3dpZHRoIH0uam9pbiAiXG4iCiAgZW5kCiAgCiAgZGVmIHNlbGYu
Zm9ybWF0X3JvdyhuLCBlbGVtZW50X3dpZHRoKQogICAgZWxlbWVudF9zZXBlcmF0b3IgPSAiICIg
KiBlbGVtZW50X3dpZHRoCiAgICBlbGVtZW50cyA9IG50aF9yb3cobikuY29sbGVjdHt8ZWxlbWVu
dHwgZWxlbWVudC50b19zLmNlbnRlciBlbGVtZW50X3dpZHRofQogICAgZWxlbWVudHMuam9pbiBl
bGVtZW50X3NlcGVyYXRvcgogIGVuZAogIAogIGRlZiBzZWxmLmVsZW1lbnRfd2lkdGgobikKICAg
IG50aF9yb3cobilbbi8yXS50b19zLnNpemUKICBlbmQKZW5kCgppZiAkMCA9PSBfX0ZJTEVfXwog
IHB1dHMgUGFzY2FsLmZvcm1hdF9yb3dzX3VwdG8oQVJHVlswXS50b19pKQplbmQ------art_11504_7986009.1151311733991--