Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: (Golf) Kaprekar's Process

by MeowChow (Vicar)
on Jun 16, 2001 at 23:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found