Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Holiday parcel puzzle

by Not_a_Number (Prior)
on Dec 22, 2011 at 20:12 UTC ( [id://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! :)

Replies are listed 'Best First'.
Re^2: Holiday parcel puzzle
by cavac (Parson) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://944838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-23 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found