7 kyu

Boiled Eggs

703 of 16,778BattleRattle

Description:

You are the greatest chef on earth. No one boils eggs like you! Your restaurant is always full of guests, who love your boiled eggs. But when there is a greater order of boiled eggs, you need some time, because you have only one pot for your job. How much time do you need?

Your Task

Implement a function, which takes a non-negative integer, representing the number of eggs to boil. It must return the time in minutes (integer), which it takes to have all the eggs boiled.

Rules

  • you can put at most 8 eggs into the pot at once
  • it takes 5 minutes to boil an egg
  • we assume, that the water is boiling all the time (no time to heat up)
  • for simplicity we also don't consider the time it takes to put eggs into the pot or get them out of it

Example (Input --> Output)

0 --> 0
5 --> 5
10 --> 10
Mathematics
Algorithms

Similar Kata:

Stats:

CreatedDec 21, 2013
PublishedDec 21, 2013
Warriors Trained23145
Total Skips1007
Total Code Submissions56691
Total Times Completed16778
JavaScript Completions7712
CoffeeScript Completions302
Ruby Completions1613
Haskell Completions468
Python Completions4579
C# Completions703
PHP Completions661
Crystal Completions11
C++ Completions842
Rust Completions203
TypeScript Completions260
COBOL Completions11
R Completions57
RISC-V Completions19
C Completions257
Factor Completions8
Java Completions96
Total Stars137
% of votes with a positive feedback rating93% of 1834
Total "Very Satisfied" Votes1612
Total "Somewhat Satisfied" Votes186
Total "Not Satisfied" Votes36
Ad
Contributors
  • BattleRattle Avatar
  • jhoffner Avatar
  • bkaes Avatar
  • TidalWave Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • myjinxin2015 Avatar
  • donaldsebleung Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • Souzooka Avatar
  • monadius Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • solitude Avatar
  • username0 Avatar
  • user5564395 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • razetime Avatar
  • pablo.fs Avatar
Ad