Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
unpublished
Please do not use problems from other sites as "inspiration". They are most probably copyrighted and recreating them somewhere else is most probably not allowed.
this requires way too much math, not programming, but math.
ok done, thanks :)
hello! please read the task again to find out. i don't want to give you a spoiler, good luck!
with the values :
100 <- money
10 <- p_price
11 <- a_price
79 <- ticket
i can buy : 1 p_pen, 1 a_pen, 1 ticket
spending all of the money
so i would return 100, but the test case wants 21
could you help ?
This comment is hidden because it contains spoiler information about the solution
I just fixed the test cases. Sorry for the inconvenience.
If you won't consider the very little variation that you just add extra conditions, then it won't be. I'll change the statement for you and other testers to understand it clearer.
This problem is for beginners to learn loops and conditions, and it may serve as an introduction to dynamic programming. That's why the contraints are very low. So, unlike considering this just a stripped-down knapsack problem, consider this as a problem for beginners to learn the basics they need to understand other deeper algos and data structs.
Hi, thanks! I just added some random tests.
Okay, but the "variation" adds nothing to the tasks.
No random tests.
It seems like you need to signup for the contest. To do that, sign in first here: https://www.hackerrank.com/apc-practice-page/. Then, go to the link I gave. I will fix the statement real quick.
Loading more items...