Code Comments
Programming Forum and web based access to our favorite programming groups.$ perl test.pl
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211
11131221133112132113212221
3113112221232112111312211312113211
1321132132111213122112311311222113111221
131221
1113122113121113123112111311222112132113
2132211331222113112211
3113112221131112311311121321123113213221
121113122113121113222123113221132122
21
1, then 11 (one "1"), then 21 (two "1"s), then 1211 (one "2", one "1"),
etc. That's the pattern.
Putting starts at 53:
$ cat test.pl
s//1\n/;for$i(1..15){print;s!(\d)\1*!$&=~y///c.$1!ge}
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.