<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>O'Reilly books (Puzzle: 100 Monkeys)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>I've just received another very generously provided batch of books from O'Reilly.</FONT>
</P>

<P><FONT SIZE=2>Slightly off-topic: I've had a somewhat busy weekend which included the birth of my 2nd son and my daughter's 5th birthday party on the same day ;)</FONT></P>

<P><FONT SIZE=2>So while I don't have all the books assembled before me, I'll do my best to recall the sum inventory of books received which have not yet been claimed for book reviews, presentations, or monthly puzzle prizes:</FONT></P>

<P><FONT SIZE=2>o&nbsp; Computer Science &amp; Perl</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; <A HREF="http://www.oreilly.com/catalog/tpj1/" TARGET="_blank">http://www.oreilly.com/catalog/tpj1/</A></FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Creating Web Applications with Mozilla</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/mozilla/</FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Designing Embedded Hardware</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/dbhardware/</FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Perl CD Bookshelf, Version 3.0</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/perlcdbs3/</FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Perl Graphics Programming</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/perlgp/</FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Perl in a Nutshell, 2nd Edition</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/perlnut2/</FONT>
</P>

<P><FONT SIZE=2>o&nbsp; Programming Web Services with Perl</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; www.oreilly.com/catalog/pwebserperl/</FONT>
</P>
<BR>

<P><FONT SIZE=2>And speaking of prizes for monthly puzzles. I'll take this opportunity to restate the current month's puzzle. There are some extremely good books available for puzzle winners. The Perl CD Bookshelf alone contains 7 of O'Reilly's most popular Perl titles and has a list price of $119.95.</FONT></P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100 Monkeys </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2003-01-14 </FONT>
<BR><FONT SIZE=2>Note: This puzzle came to me unattributed by way of a </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; co-worker. If anyone chances by the source, please </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let me know so I can give credit. </FONT>
</P>

<P><FONT SIZE=2>There are 100 doors, all closed.&nbsp; In a nearby cage are 100 </FONT>
<BR><FONT SIZE=2>monkeys.&nbsp; The first monkey is let out, and runs along the </FONT>
<BR><FONT SIZE=2>doors opening every one.&nbsp; The second monkey is then let out, </FONT>
<BR><FONT SIZE=2>and runs along the doors closing the 2nd, 4th, 6th,...&nbsp; all </FONT>
<BR><FONT SIZE=2>the even-numbered doors.&nbsp; The third monkey is let out.&nbsp; He </FONT>
<BR><FONT SIZE=2>attends only to the 3rd, 6th, 9th,... doors (every third </FONT>
<BR><FONT SIZE=2>door, in other words), closing any that is open and opening </FONT>
<BR><FONT SIZE=2>any that is closed.&nbsp; The fourth monkey does the same for the </FONT>
<BR><FONT SIZE=2>4th, 8th, 12th, 16th,... doors, opening the closed ones and </FONT>
<BR><FONT SIZE=2>closing the open ones.&nbsp; The fifth monkey does the same to </FONT>
<BR><FONT SIZE=2>the 5th, 10th, 15th,... doors, and so on.&nbsp; After all 100 </FONT>
<BR><FONT SIZE=2>monkeys have done their work in this way, which doors are </FONT>
<BR><FONT SIZE=2>left open? </FONT>
</P>

<P><FONT SIZE=2>Format:&nbsp;&nbsp; m/^\d+(?:\s\d+)*$/ # scalar must match this regex </FONT>
</P>

<P><FONT SIZE=2>Goal:&nbsp;&nbsp;&nbsp;&nbsp; fastest script to calculate the answer </FONT>
</P>

<P><FONT SIZE=2>Prize:&nbsp;&nbsp;&nbsp; Your choice of O'Reilly's </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o&nbsp; Perl in a Nutshell, 2nd Edition </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o&nbsp; Creating Applications with Mozilla </FONT>
</P>

<P><FONT SIZE=2>Deadline: Answers must be submitted at least 24 hours </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; before the next kc.pm meeting (February 11th) </FONT>
</P>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Garrett Goebel </FONT>
<BR><FONT SIZE=2>IS Development Specialist </FONT>
<BR><FONT SIZE=2>ScriptPro&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Direct: 913.403.5261 </FONT>
<BR><FONT SIZE=2>5828 Reeds Road&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Main: 913.384.1008 </FONT>
<BR><FONT SIZE=2>Mission, KS 66202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax: 913.384.2180 </FONT>
<BR><FONT SIZE=2>www.scriptpro.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; garrett at scriptpro dot com </FONT>
<BR><FONT SIZE=2>&nbsp;</FONT>
</P>

</BODY>
</HTML>