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

Home > Numbers
Millionth Pandigital II (Posted on 2023-05-29) Difficulty: 3 of 5
Consider all the (non leading zero) positive ten-digit pandigitals arranged in descending order..

Determine the millionth number on the list.

*** Computer program/spreadsheet assisted methodologies are welcome, but extra credit will be given for an analytical solution.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution | Comment 1 of 9
Of the 3265920 ten-digit pandigitals that do not start with zero and are in descending order, the millionth number on the list is 7216084539

-------------

from itertools import permutations
ds = '0123456789'
pans = []
for perm in permutations(ds):
    if perm[0] == '0':
        continue
    pans.append(int(''.join(perm)))

panlist = sorted(pans)[::-1] # in order, then reverse the order

print( panlist[999999] ) # the list is zero based
  Posted by Larry on 2023-05-29 08:58:07
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 (16)
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