We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Mathematics
- Fundamentals
- K Candy Store
- Discussions
K Candy Store
K Candy Store
Sort by
recency
|
63 Discussions
|
Please Login in order to post a comment
In some languages this does not submit correctly.
In Node.js, paste:
ws.write(result + "\n")
at the end of function main's for loop.
Cheers!
The Python template is missing the code to write the result to stdout. You can add the following lines to do so:
This code efficiently calculates the number of ways Jim can buy candies, a common problem in computer science courses. I am getting assignment help from it.
The framework for C doesn't output any results. In
main()
, right underneathadd the following line:
Python 3 solution:
Explanation:
See section Number of combinations with repetition here: https://en.wikipedia.org/wiki/Combination