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.
This comment is hidden because it contains spoiler information about the solution
If the change was done to example tests, then this does not invalidate any solutions because solutions are tested only against the submission tests, and not example tests.
Quite mathematical kata on some little algorithm optimization, well done.
As said in description:
This means the first team (team who scored 30) will know the bonus amount of the second team (team who scored 20), the second team will know the amount of bonus from the third team (team who scored 10). Also said in description that:
First we know that the third team knew none of the other teams' score, therefore they get the lowest of
1
bonus. Secondly, the second team knew the score of third team (which means second team have a higher amount of score), therefore they needed a bonus amount higher than 1, which is2
. We can also use the same logic to get the amount of bonus for the first team, they needed a bonus higher than 2, which is3
. Then we add all the bonuses together to get:1+2+3=6k, so the answer is 6 for minimum bonus. Sorry if my explaination isn't clear enough :)
glad you enjoyed it!
Thanks for the comment ~ inspired to create an anniversary celebration themed kata, I strove to create a simple real-world task that could be easily visualized.
great kata!
Thank you very much,that was very helpful.Im beginner and i wouldnt consider this approach.
Tl;dr, you need a faster code. Most passed solutions can solve this kata within 1000ms.
Troubleshooting Your Solution
(Hint: try to look for pattern instead of brute-forcing)
This comment is hidden because it contains spoiler information about the solution
Resolved in this fork
Description should be language-agnostic
Probably better to use KaTeX for the mathematical part of the code
Thanks @cod3abuser! But technically it's not a good solution hahaha
Thanks for the nice kata!
Loading more items...