Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Friday Golf: All 2-digit combinations

by Chady (Priest)
on Sep 26, 2003 at 13:14 UTC ( #294406=note: print w/ replies, xml ) Need Help??


in reply to Friday Golf: All 2-digit combinations

Please note that you have an error in your code, you've got 01 for example displayed more than once, (I got obviously late in posting)

79.

$_=join'',('00'..'99');1while(s/(..)(.*)\1/$1$2/);1while(s/(.)\1\1/$1$1/);print
123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789

75. (removed stupid parnes)

$_=join'','00'..'99';1while s/(..)(.*)\1/$1$2/;1while s/(.)\1\1/$1$1/;print
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/


Comment on Re: Friday Golf: All 2-digit combinations
Re^2: Friday Golf: All 2-digit combinations
by PhilHibbs (Hermit) on Sep 29, 2003 at 09:13 UTC
    You're missing 90

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-07-04 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls