Jeníček and Mařenka visit their grandmother, who has a confectionery and sells gingerbread. Both of them naturally help her, especially with decorating. In the time it takes for the grandmother to decorate five gingerbreads, Mařenka decorates three and Jeníček decorates two. During their last visit, all three of them decorated five full trays together. Mařenka and the grandmother decorated the whole time, while Jeníček, in addition to decorating, arranged the gingerbreads in groups of twelve on one tray and carried them to the pantry. All three started and finished at the same time.

1. How many gingerbreads did Jeníček decorate?
2. How long did the entire work take if the grandmother decorates one gingerbread in 4 minutes?
3. How long did Jeníček help with decorating?

(M. Petrová)
First, we will determine how many gingerbread cookies they decorated in total. There were 5 trays of twelve cookies each, which makes 60 cookies $(5 \cdot 12=60)$.

If all three of them took a cookie at the same time and started decorating it, then under the given conditions, all three would take another cookie at the same time only when the grandmother decorates the fifth, Marinka the third, and Jeník the second, and not before. Not even two of them would take a cookie at the same time before the specified time. We will call this time interval one "cycle." The number of cycles must be a whole number (the grandmother finished with Marinka at the same time).

First, let's imagine that Jeník only decorated and did not help with anything else. Then, in one cycle, all three together would decorate 10 cookies. To decorate sixty cookies, they would need exactly 6 cycles $(60: 10=6)$. However, since Jeník did not decorate for the entire 6 cycles (he also aligned the cookies on trays and carried them away), the grandmother and Marinka had to decorate for at least 7 cycles.

If they worked for 8 cycles, the grandmother would have decorated 40 cookies $(8 \cdot 5=40)$ and Marinka would have decorated 24 cookies $(8 \cdot 3=24)$. Together, they would have decorated 64 cookies, which is more than they had. Since they had to complete a cycle (otherwise, one would finish before the other), there could not have been 8 or more cycles.

This means that the grandmother and Marinka worked for exactly 7 cycles. The grandmother decorated 35 cookies $(7 \cdot 5=35)$ and Marinka decorated 21 cookies $(7 \cdot 3=21)$. Jeník decorated 4 cookies $(60-35-21=4)$.

If the grandmother decorates one cookie in 4 minutes, one cycle lasts 20 minutes $(4 \cdot 5=20)$. The entire work took them 140 minutes $(7 \cdot 20=140)$, which is 2 hours and 20 minutes.

Since Jeník decorated 4 cookies, he decorated for two full cycles $(4: 2=2)$, which is 40 minutes $(2 \cdot 20=40)$.

Another solution. The problem can also be solved by "ignoring" Jeník's decorating. The grandmother and Marinka together decorate 8 cookies in one cycle, so there can be at most 7 cycles $(60: 8=7$, remainder 4). The remaining 4 cookies will be decorated by Jeník. If there were only 6 cycles, Jeník would have been decorating the entire time and could not, for example, carry the trays. There could not have been fewer cycles. From then on, everything is the same.