Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: (Golf) Kaprekar's Process

by MeowChow (Vicar)
on Jun 16, 2001 at 23:00 UTC ( #89081=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $| = 1;
    for (100..999) {
      next if /(.)\1\1/;
      print "$_ : ", k($_), $/;
    }
    
  2. or download this
    sub k {
      $_=sprintf"%03d",pop;/495/?0:1+k(-($_=join'',sort/./g)+reverse)
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls