6 kyu
Christmas Present Calculator
226 of 418zruF
Loading description...
Date Time
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Fancy and funny series...
Looks like I faced a bug for JS. Any test case expects "0"
You should not be modifying the given input
Go Translation
ty for your translation, is approved :)
.
python new test framework is required. updated in this fork
ty for updating, approved
The user can modify the input.
fixed.
Nice series :)
I think there is some bug in C# version. I didn't have this issue with Javascript's version. The production power is bigger than time needed for 1 present and your Random test returns 0.
Thanks for this information! I made a little mistake in the translation from javascript. It should be fixed now :)
I think there is still some bug. Check if your sorting works. In the below you have: 19:07:16 x 17 times, 08:25:58 x 15 times. 30358 x 5 = 151790. But your Total power is 345600. There is still some elf power left for more presents ;)
I hope it's fixed now.
It accepted my C# solution . Thanks!
This kata tells me it's awaiting an approval. Someone has to help! :]
Python translation added!
I recommend adding some further clarification in the kata description (at first it appeared that this kata may have required incorporating aspects of the Knapsack problem).
Perhaps it could be made clear that work on a given present can be distributed between more than one "elf" (in quotations because I'm including Santa as an elf). Without the detail, it leaves open ambiguity for the fundamental design of a solution.
Some users may wonder if an elf that doesn't have enough time to work on building any remaining toys loses their remaining productivity or if their time can be allocated to helping another elf on completion of a toy.
EDIT: to give an example:
elf1
has made 4 toys already and has remaining time of half a day.elf2
hasn't made any toys but has the productivity level to make a toy in half a day. Each of the remaining yet-to-be-made toys requires at least 15 hours each. Individually, the two elves cannot build any more toys. If, however, they combine their remaining productivity, they can make 1 additional toy.EDIT #2&3: grammar improvement
I updated the description and hope "You can count it as one work capacity" clarifies it a bit. Too much description isn't good either ;)