Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: (Golf) Kaprekar's Process

by ZZamboni (Curate)
on Jun 16, 2001 at 23:08 UTC ( #89083=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub a {
    $_=shift;do{$_=join'',sort/./g;$i++}while($_=(reverse)-$_)!=495;$i
    #23456789012345678901234567890123456789012345678901234567890123456
    }
    
  2. or download this
    sub a {
    $_=shift;do{$_=join'',sort/./g;$_=(reverse)-$_;$i++}until/495/;$i
    #2345678901234567890123456789012345678901234567890123456789012345
    }
    
  3. or download this
    sub a {
    $_=pop;do{$_=join'',sort/./g;$_=(reverse)-$_;$i++}until/495/;$i
    #23456789012345678901234567890123456789012345678901234567890123
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89083]
help
Chatterbox?
[Lady_Aleena]: karlgoethebier, when I don't know what I am looking at, it makes it hard to figure things out.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-06-26 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (575 votes). Check out past polls.