In preparation for a banquet dinner, you are carving up a massive cubic block of cheese. The only people who will be eating the cheese are you and six guests invited to the banquet.
Cheese must always be consumed in tiny cubes (so dictate the laws of cheese etiquette). With this in mind, you pick a large number, $n$, and proceed to cut the cheese block into perfect identically-sized cubes by making $n$ cuts widthwise, $n$ cuts heightwise, and $n$ cuts depthwise. You're positive that you've made $n$ large enough that each guest will get several cubes of cheese.
Unfortunately, as luck would have it, you forget $n$ as soon as you've finished.
No problem. You have 30 minutes left until the cheese has to be set out. You decide to count the number of cubes along one edge of the block, and do so. Exactly 15 minutes later, at the moment you've finished counting the last cube along the edge, disaster strikes! The MC rushes into the kitchen to inform you that the guests are feuding, and that if each guest doesn't get exactly the same number of cheese cubes, the dinner will be ruined. If there are any cubes left over, the guests will surely fight over them, which isn't acceptable. Nor is it acceptable for you to eat or discard any left over cubes.
You've misplaced your knife, hence cutting the cheese cubes is out of the question. And the guests are hungry, hence everyone (including you) must get at least one cube of cheese.
To remedy the situation, you're able to count, remove or replace individual cheese cubes from the block. You figure you can remove/replace them as quickly as you counted them earlier, and, if need be, you can count a cube while you remove or replace it.
Along each edge there are... Oh no! Curses! With all the excitement, you've forgotten the number!
Panic sets in.
You have 15 minutes left. Exactly enough time to count, remove, or replace as many cubes as are along one edge of the cheese block. You can finish early, but you can't finish late.
Note the sequence of events:
- you count, remove, or replace cubes
- you put the remaining cheese cubes out
- you take your cheese cubes to eat (there must be at least one)
- the guests take turns taking cubes, repeating until none are left
What do you do?
(Please note that this is a math problem and not a lateral thinking problem.)