Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Holiday parcel puzzle

by JavaFan (Canon)
on Dec 22, 2011 at 22:33 UTC ( #944868=note: print w/replies, xml ) Need Help??


in reply to Re: Holiday parcel puzzle
in thread Holiday parcel puzzle

The problem with your "concise" solution is that it's unclear whether your program matches the problem description. If you don't care about the latter, here's an even more concise one:
use 5.010; say "Please wait while I run a simulation ...."; sleep 5; say "Elves have wrapped a billion parcels, calling FedEx ...."; sleep 10; say "Not switching wins 33.3% of the time"; say "Switching wins 66.7% of the time";