6 kyu

Christmas Present Calculator

226 of 420zruF

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":
Date Time
Fundamentals

Stats:

CreatedDec 22, 2016
PublishedDec 22, 2016
Warriors Trained1266
Total Skips50
Total Code Submissions4571
Total Times Completed420
JavaScript Completions226
Python Completions139
C# Completions70
CoffeeScript Completions6
Go Completions4
Total Stars40
% of votes with a positive feedback rating91% of 106
Total "Very Satisfied" Votes91
Total "Somewhat Satisfied" Votes11
Total "Not Satisfied" Votes4
Total Rank Assessments9
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • zruF Avatar
  • myjinxin2015 Avatar
  • kazk Avatar
  • hobovsky Avatar
  • Lixfeld Avatar
  • saudiGuy Avatar
Ad