All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Getting Four-Six With Nine Digits (Posted on 2008-03-16)
Nine digit positive integers of the form PQRSTUVWX are called four-six numbers if the digits P, Q, R and S (in this order) are in strictly ascending order of magnitude, while the digits S, T, U, V, W and X (in this order) are in strictly descending order of magnitude.

For example, each of 567876543 and 678986430 is a four-six number, but 567876654 is NOT a valid four-six number since the digits 876654 (in this order) are not in strictly descending order of magnitude. Similarly, 678875432 is NOT a valid four-six number since the digits 6788 (in this order) are not in strictly ascending order of magnitude.

All the possible four-six numbers are now arranged in descending order of magnitude.

What is the 4664th number?

Note: No four-six number can contain leading zeroes.

 See The Solution Submitted by K Sengupta Rating: 2.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 Solution, agreed | Comment 8 of 9 |

I see that Charlie and xdog in their second posts came to the same solution as mine just above (245986541), so this seems to be the agreed answer. About the only complexity was to define the loops correctly. The first four could be between 1234 and 6789; the last six could be between 987654 abd 543210 -- where the fourth position "S" is shared.

Sorry my last posting ran all together; apparently the line feeds did not take.

 Posted by ed bottemiller on 2008-03-17 20:44:37

 Search: Search body:
Forums (0)