LogoWCF

Day 4: No Time To Waste!

It’s crunch time! Holly (one of the floor managers in manufacturing warehouse 14) is getting pretty stressed about being able to finish the required amount of work that has been allocated to her team. She needs to figure out how much time it is going to take her team to finish this batch of presents so that she can get a portion of this batch reassigned before it is too late.

Holly has queried all of the presents (in order) that are going to be coming down the conveyor belt in the next batch, and output the time it takes for an average elf to assemble and package each present into a file (presents.txt). Her team currently consists of 4 elves: Snap, Crackle, Pop, and Steve. Each of the elves work at different paces. Snap is very speedy and works at 1.4 times the speed of the average elf. Crackle is slower than most, and works at .7 times the speed of the average elf. Pop is fairly normal, working at 1.1 times the speed of the average elf, and Steve works at the average speed of the average elf. He is one of the better looking elves.

When the elves finish a present, if they finish in between minutes they always wait for the next minute on the clock to actually get up to get the next project. It takes the elves one minute to get up and grab the next project off of the conveyer belt, and if more that one elf is getting up to get a present at the same time, they grab the next presents in order (Snap, Crackle, Pop, and then Steve).

Problem: Please figure out how many minutes this batch in presents.txt is going to take!

Note: Yes it’s sad, but elves don’t get breaks. Ever. No need to calculate in breaks or sleep time!

Solutions