How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct?
The number of people is given in input.
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers15
Suggested Problems
-
Sum of first n terms of a harmonic progression
501 Solvers
-
Longest run of consecutive numbers
6503 Solvers
-
254 Solvers
-
Number of odd and even elements within matrix
160 Solvers
-
Create the following sequence : 0 1 1 4 9 25 64 169 ...
204 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Please fix the test suite so rounding isn't required to get the correct answer for x=25.
I agree with James: for test 3 the true answer is 623360743125120. It should also be clarified in the problem statement that the function input "x" corresponds to n² (not n). Lastly, it is better not to format the problem statement as if it were code.
I agree with everyone. My guess is that the author was using the short format for numbers and just copied 6.2336e+14. If you write format long and do the calculation again, you may see the correct answer.
The test suite has been corrected for precision error. The format of the problem statement has been changed, however, the language seems fine.