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.
!
Atleast in my world, things don't have negative price and niether the quantity is negative. :D
Yes, it is necessary, otherwise I'll pass the modified argument to reference solution which would destroy randomness, and then I can hard-code the fixed tests solution.
This comment is hidden because it contains spoiler information about the solution
Thanks for your feedback on my first kata! :)
Check if that division is messing up the numbers. Maybe you need another kind of division, like integer divison
Author or power user available to approve this translation?
This comment is hidden because it contains spoiler information about the solution
Something like this should be reportable... or better: not even possible if the author would have used random tests
I'm happy that you passed!
I found what was missing and completed my solution 🙂
Hint: was a slight oversight in my while condition which allowed me to exit earlier.
So you're saying the problem is my solution is actually too slow? I'd have 0 clue how to get it faster 🤔, I already optimized it some times.
I tried a few solutions, one of the fastest took 1500ms.
This comment is hidden because it contains spoiler information about the solution