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.
Hi,
In the tests floats are rounded to 6 decimals, and tested with a delta of [-0.000001..+0.000001].
I woill add a comment to the description.
thanks
you're right, I'll add some more tests
and rewrite my solution
thanks
Right thanks :)
fixed it now and learned something new in python
fixed it.
thanks
This was for a negative input.
I rephrased it a little bit.
Thanks for your input.
thanks for the response; will try to add some soon
I'll try put some effort in it soon.
Any favorites from your side?
I was planning on Python, Elixir, Kotlin, JavaScript and maybe some C.
thanks for your reply, Andrew
I added an extra line in the rules for this
You're absolutely right, (I messed up the numbers myself)
Should be better now
thanks
I extended the initial example in the kata with the same explanation to clarify.
thanks
Hi,
Those details are described in the rules.
The crucial part is following:
The demand is filled in the same sequence as set in the challenge (from left to right), the supply is used up from lowest price to highest.
The capacity of the supplier with the lowest price is used up for all demands, before the next is consumed.
Let's say you set a price of 19.19.
In the example this means first 2000 pieces are consumed from supplier with price 16.00.
After fulfilling supplier 1, following demand is remaining:
[ [100, 23.10], [888, 19.19], [3000, 11.8] ]
This is all consumed from the second supplier who has a capacity of 5000.
So if your price is 19.19 then no demand is left to fullfull.
Also the way you calculate your revenue is wrong.
It is the amount of your capacity sold for the price you set.
For 16.99 your revenue is 500 * 16.99 because all can be sold in that case.
For 19.19 your revenue is 0 * 19.19 because nobody want to buy from you.
Does that help?
you're right
I will remove it
ok thanks, this is fixed
you're right, is fixed now thanks
Hi,
Ok thanks
I'll add some addititional random tests.
Loading more items...