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 would ask you to please mind your language on the site. Also constructive feedback goes a long way further than just insults.
I understand it's difficult to word it correctly. I would have tried to use the factory backstory to describe it, but eschewing the concept of "boxes" because it is too irrelavant to the task:
11
-grams bearings instead of the usual10
-grams bearings it normally makes. We dont know which batch it was, it is the codewarrior's job to figure it out.11
-grams batch. We have to return the ID of this faulty batch.Manual notification ^^
This comment is hidden because it contains spoiler information about the solution
the setup and description of this kata really confused me. i'm not sure to which extent it's intentional not to spoil the solution.
Since the bearings have a nonzero weight, that would mean the boxes have infinite weight. Which would make the exercise pointless. It also defeats the purpose having a backstory since it stops making sense in the physical world.
It's never explained what the "type" of a ball bearing is. Are they some kind of IDs that are guaranteed to be unique in the input list ? If so, why cannot they just be plain integers ? Does each box contain exactly one type of bearing ?
I enjoyed the kata nonetheless
Great. Ty again for the help!
Seems fixed
Right, I did that and republished just now. Now outputs are no longer "truncated". I'll come back in a short while to make sure outputs are still correct and mark as solved if that's the case.
I noticed our solutions produce different outputs, so I'll check wether that's a mistake in mine or yours and send an update when done.
Thanks again.
I don't think it is resolved, I am now getting many results like this:
You probably need to set
Decimal.getcontext().prec
to be much higher.Excuse me, I overlooked it. I unflagged my response since it doesn't really represent a relevant spoiler to the solution, at least in my opinion.
I cannot see your comment since I cannot solve the kata. You could come to the Discord (see link on the left menu) and we can discuss there. Otherwise if you want a reference you can click "view solution" under my comment to see what I think should be a correct solution.
I suspect you might have precision issues in your reference solution. For example with inputs:
up=2, goal=2020450000000000000000
, I calculate that we should be upgrading126063
times, which should result in total clicks of10684790872762699
, but your tests expect 1 less at10684790872762698
.As the inputs get larger, the discrepency grows too.
Very hard 3kyu (at least in Agda) but very nice!
.
It was not actually a problem with the reference solution (since no reference solution is used) but I found and fixed a bug where randomly generated nodes were not guaranteed to be unique, which may have been the problem.
Loading more items...