Problem 45193. Fun with permutations
Solution Stats
Problem Comments
-
3 Comments
I couldn't figure out why my numbers were larger than the answers in the test suite and finally realized that most of those answers were products of the unique factors of the numbers of permutations.
I can assume William has done so as to prevent hard-coded solutions, and add a flair to the test suite while maintaining a simple method to check the solutions as well.
@Dyuman you're right, of course. Leave it to me to solve a problem after midnight, and not realize that the test suite is not in fact checking for exact equality.
I'll delete my previous comment so as to not give too many hints.
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
1090 Solvers
-
264 Solvers
-
909 Solvers
-
Magic is simple (for beginners)
7316 Solvers
-
Number of odd and even elements within matrix
148 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!