Numbers, operators, and conversion

How many full bins can you fill, and how many items remain?

Examples

Worked example

Input
23 items, bins of 4
Expected output
5 full bins, 3 remaining

Hints and solution

Hint 1

Write down the starting state and walk through one example by hand.

Reveal worked answer

23 // 4 gives 5. Five bins use 20 items, so 23 % 4 leaves 3.

Back to the lesson