PyPE solution to PE problem 41
Registered by
Scott Armitage
PyPE solution to PE problem 41
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Approved
- Series goal:
- None
- Implementation:
-
Implemented
- Milestone target:
- None
- Started by
- Scott Armitage
- Completed by
- Scott Armitage
Related branches
Related bugs
Sprints
Whiteboard
ProjectEule
===
We shall say that an n-digit number is pandigital if it makes use of all
the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital
and is also prime.
What is the largest n-digit pandigital prime that exists?
Solution
--------
we generate successively shorter lists of [9,8,7,
and then look at all of the permutations of the list. Once a prime number
is found, we return that number, as it is the correct solution.
Answer
------
7652413
(?)