\title	{Shelf of bookshop 3 authors}
\author	{XIAO Gang}
\email	{xiao@unice.fr}
\format	{html}

\integer	{limit=random(10..18)}
\integer	{A1=random(1..\limit-1)}
\integer	{B1=random(1..\limit-1)}
\integer	{C1=random(1..\limit-1)}
\integer	{A2=\limit-\A1}
\integer	{B2=\limit-\B1}
\integer	{C2=\limit-\C1}
\integer	{SA=random(1..30)}
\integer	{SB=random(1..30)}
\integer	{SC=random(1..30)}
\integer	{F1=\A1*\SA+\B1*\SB+\C1*\SC}
\integer	{F2=\A2*\SA+\B2*\SB+\C2*\SC}
\integer	{total=\SA+\SB+\SC}
\integer	{FS=\F1+\F2}

\statement	{A bookshop ranges its shelf of novels.<ul>
		<li>If one shows \A1 (resp. \B1, \C1) copies of
		each title of author A (resp. author B, author C), 
		there will be \F1 books on the shelf.
		<li>If one shows \A2 (resp. \B2, \C2) copies of
		each title of author A (resp. author B, author C), 
		there will be \F2 books on the shelf.
		</ul>
		<p>How many titles are there in total for these three
		authors?}
\answer  	{The total}  {\total}
\solution	{If one add the two options, one sees that there will be
		\F1+\F2 = \FS books, with \A1+\A2 = \limit copies
		for each title for author A, and the same for the other
		authors. Therefore the total of titles is \FS/\limit = \total.}

