Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: (Golf) Giving Change

by MeowChow (Vicar)
on Jun 12, 2001 at 20:22 UTC ( #87862=note: print w/ replies, xml ) Need Help??


in reply to Re: (Golf) Giving Change
in thread (Golf) Giving Change

I'm not sure how boo_radley counted 54 - it's actually 60. You count only the characters inside the sub. You should also add three characters to reset @r (thereby making this sub usable more than once).

Anyway, here's a solution at 54:

sub c{($t,$p)=@_;map{$t-=($x=int$t/$_)*$_;($_)x$x}reverse@$p}
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print


Comment on Re: Re: (Golf) Giving Change
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-11-29 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls