A sheikh had to pay three men with a batch of 21 equal wine casks, seven of them being full, seven half-full, and seven empty. How could Beremiz do the distribution, in such a way that each man received the same number of casks and the same amount of wine?
Input consists in several natural numbers , all between 2 and .
For every
,
print a line with
“:”.
Then, print in three lines any way to divide
full casks,
half-full
casks and
empty casks among three men, so that each one receives
casks and the same total amount of wine. The
-th
line must contain, separated by spaces, the number of full casks,
half-full casks and empty casks that correspond to the
-th
man. Follow the format of the samples exactly.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T10:12:37.708Z
© Jutge.org, 2006–2026.
https://jutge.org