Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89101]
[shmem]: ww: black box, red flags...
[marto]: the first against the wall when the revolution comes is always the people who say 'the first against the wall when the revolution comes...'
marto ducks
[holli]: must watch
[holli]: good thing i added a question mark then
[shmem]: marto: nice paraphrase of 1st club rule
[holli]: plausible deniability ;)
[marto]: the first rule of chess club, touch piece
[ww]: but "don't touch 3rd rail?"\
LanX hails himself \o

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2017-11-21 13:37 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (301 votes). Check out past polls.