Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Holiday parcel puzzle

by Not_a_Number (Parson)
on Dec 22, 2011 at 20:12 UTC ( #944838=note: print w/ replies, xml ) Need Help??


in reply to Holiday parcel puzzle

Update: Added spoiler tags

Update 2: Looking now at the OP's much more verbose code, I wonder if mine is not too concise, especially if the aim is to convince someone who doubts the actual odds.

Anyway, it was enough to convince me! :)


Comment on Re: Holiday parcel puzzle
Download Code
Re^2: Holiday parcel puzzle
by cavac (Chaplain) on Dec 22, 2011 at 20:17 UTC

    Nice one. Actually, way nicer than mine.

    BREW /very/strong/coffee HTTP/1.1
    Host: goodmorning.example.com
    
    418 I'm a teapot

      So do I win the 1000XP?

      :-)

        I i could give them to you, i probably would.

        But i'm just a humble Pilgrim, working in the Department Of Bugsniffing. My hope is, that, one day, i'll be promoted to Friar. If i'm very lucky, i might even get my own desk.

        BREW /very/strong/coffee HTTP/1.1
        Host: goodmorning.example.com
        
        418 I'm a teapot
Re^2: Holiday parcel puzzle
by JavaFan (Canon) on Dec 22, 2011 at 22:33 UTC
    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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://944838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2014-09-24 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (245 votes), past polls