BTW, I just noticed...
- Digit 3 is the highest number.
- Digit 5 is ... half of digit 4.
- Digit 1 is higher than the sum of digits 4 and 5.
Which means assuming 3 is "9" (as big as it can be), then 1 can be at most "8", so 4 + 5 can be at most "7", so the biggest they can be are "4" and "2".
So now you've got "8_942" as your max, and with the no duplicates rule (and the "2 is lowest" rule), that means you can stop your for loop at "83945".
UPDATE: But wait, there's more!!!!!
Using the same rules, we can increase the starting number of your for loop ... 4 and 5 have to be at least "2" and "1" (because of the half rule) which means 1 has to be at least "4", which gives you 4__21, so you can safely start your for loop at "40321".
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.