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

Re: Re: Re: Re: Re: (Golf) Kaprekar's Process

by srawls (Friar)
on Jun 17, 2001 at 00:57 UTC ( #89101=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: (Golf) Kaprekar's Process
in thread (Golf) Kaprekar's Process

Ok, I get it. I can modify yours than, and improve it by two chars:
sub a { $_=pop;s/^..$/0$&/;/495/?0:1+a(-($_=join'',sort/./g)+reverse) }

The 15 year old, freshman programmer,
Stephen Rawls

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89101]
help
Chatterbox?
[Eily]: karlgoethebier: more like grata non persona :P
Discipulus personae non gratae..
[Corion]: Your Mother: Hmm - I have the pmdev nodelet, which has some links, but I'm not sure what links/guides there are
[Corion]: pmdev wiki maybe?
[Discipulus]: uh neat karl!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-07-21 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (319 votes). Check out past polls.