7 kyu

Boiled Eggs

7,698 of 16,691BattleRattle

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 Trained23029
Total Skips998
Total Code Submissions56460
Total Times Completed16691
JavaScript Completions7698
CoffeeScript Completions302
Ruby Completions1611
Haskell Completions467
Python Completions4539
C# Completions699
PHP Completions658
Crystal Completions11
C++ Completions834
Rust Completions200
TypeScript Completions257
COBOL Completions11
R Completions56
RISC-V Completions19
C Completions254
Factor Completions8
Java Completions79
Total Stars139
% of votes with a positive feedback rating93% of 1830
Total "Very Satisfied" Votes1608
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