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.
I find it really bad that it is counting on a specific order of the functions to be called, trying to make the float error predictable or deterministic and then rounding it down.
This comment is hidden because it contains spoiler information about the solution
I saw the example. As I said, it doesn't make sense if there's no rounding involved.
If you calculate using n * (beets - (n - 1) * penalty) it will never have rounding issues, so I don't get how that could apply.
It's not obvious how 'Dwight will not exceed the number of crops which would produce the maximum' happens if there is no rounding involved. If its not that what you're talking about, than the explanation should indeed be clearer, since I have no idea where else you talk about not using the highest value.
Either I got something wrong or the generative tests are finding the wrong maximum.
Take this set of values, 366613 11. I've found the maximum being at 16665 while the tests fail with the maximum being 16664 (respective total numbers are 3054944485 and 3054944480).
This particular fail happened after 7 succeeding successfull random tests, but other fails happened with the same 1 crop difference.