Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
"be consistent"
 
PerlMonks  

Re: YAGG (Yet Another Golf Game)

by chipmunk (Parson)
on Feb 13, 2002 at 06:33 UTC ( #145095=note: print w/ replies, xml ) Need Help??


in reply to YAGG (Yet Another Golf Game)

This solution comes in at 89 characters:

@h=0;print map(rand>.5?++$H&&++$h[-1]&&H:++$#h&&$",a..gr),$/, join('|',grep$_,@h),$/,$H,$/
Could you clarify the exact output format that the code should produce?


Comment on Re: YAGG (Yet Another Golf Game)
Download Code
Re: Re: YAGG (Yet Another Golf Game)
by Necos (Friar) on Feb 13, 2002 at 21:14 UTC
    Just a the number of heads that occur in a row, follwed by the number of heads total. Look at the sample output in the root node for a better example. The only real requirement in the output is that the flip data, tally, and total need to be separated by newlines.

    Theodore Charles III
    Network Administrator
    Los Angeles Senior High
    4650 W. Olympic Blvd.
    Los Angeles, CA 90019
    323-937-3210 ext. 224
    email->secon_kun@hotmail.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-04-19 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls