Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but different orders are considered different.
For n=5, k=2 the answer is 4.
5 = 1 + 4
5 = 2 + 3
5 = 3 + 2
5 = 4 + 1
please correct the reference solution to com(x,k) instead of com(x)
Please correct test cases, the function should have 2 arguments.
Back to basics 10 - Max Float
Arrange vector in ascending order
Generate pi using logarithm
Basics: Divide integers to get integer outputs in all cases
2倍してみよう - ここからスタート！
How many ways to write
Choose group with people
Find the number of rectangles
odd number odd sum
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office