Opening your workspace…
Workspace/Coding room
Opening your workspace…
Mrs. Finch has knitted a travelling coat for six eggs. Every egg must travel in a coat, even if it gets five empty sleeves to itself. Given the number of eggs at the station, return the fewest coats she needs to unpack. Practice rank · 8 kyu (Brewery estimate).
7OUTPUT2Six button up together. The seventh takes a coat of its own.
0OUTPUT0Nobody has come to the station.
How many coats does the first egg of a new batch need?
function solve(eggs) { // Write your answer here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.
72