Christmas Present Calculator
Description:
Christmas Present Calculator
After we find out if Santa can save Christmas there is another task to face.
Santa's little helper aren't sick anymore. They are ready to give away presents again. But some of them are still weak.
This leads to more productive elves than others.
How many presents can Santa distribute this christmas?
Your Task:
You will get two inputs.
One dictionary with the producitivity of each elf like the following:
{"Santa": 1, "elf_1": 1, "elf_2": 1, "elf_3": 2, "elf_4": 3}
and a string array with the time needed for each present like the following:
"hh:mm:ss"
The productivity describes the workload an elf can do each day:
//productivity 1 = 24 hours each day
//productivity 2 = 48 hours each day
...
Return the number of present they can distribute at maximum.
Note that:
- They have only 24 hours
- They try to give out as much as presents as possible (the ones with less time first)
- All the elves can work on multiple tasks. You can count it as one work capacity
This kata is part of the Collection "Date fundamentals":
- #1 Count the Days!
- #2 Minutes to Midnight
- #3 Can Santa save Christmas?
- #4 How Many Presents?
Similar Kata:
Stats:
Created | Dec 22, 2016 |
Published | Dec 22, 2016 |
Warriors Trained | 1266 |
Total Skips | 50 |
Total Code Submissions | 4571 |
Total Times Completed | 420 |
JavaScript Completions | 226 |
Python Completions | 139 |
C# Completions | 70 |
CoffeeScript Completions | 6 |
Go Completions | 4 |
Total Stars | 40 |
% of votes with a positive feedback rating | 91% of 106 |
Total "Very Satisfied" Votes | 91 |
Total "Somewhat Satisfied" Votes | 11 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 9 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |