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

Home > Numbers
Getting Four-Six With Nine Digits (Posted on 2008-03-16) Difficulty: 3 of 5
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: 3.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Nine Loops | Comment 7 of 9 |
(Before looking at previous postings) Generate the 9500 "four-six numbers": vary p from 1 by 1 until p > 6 vary q from p+1 by 1 until q > 7 vary r from q+1 by 1 until r > 8 vary s from r+1 by 1 until s > 9 vary t from s-1 by -1 until t < 4 vary u from t-1 by -1 until u < 3 vary v from u-1 by -1 until v < 2 vary w from v-1 by -1 until w < 1 vary x from w-1 by -1 until x < 0 Sort these in descending order (678987654 to 123543210) The 4664th is 245986541 (I'll post, then look at other comments.)l
  Posted by ed bottemiller on 2008-03-17 20:33:17
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information