Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-10-22 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls