[ Motion task ]

Two hunters set out at the same time towards each other from two villages, the distance between which is 18 km. The first walked at a speed of 5 km/h, and the second at 4 km/h. The first hunter took a dog with him, which ran at a speed of 8 km/h. The dog immediately ran towards the second hunter, met him, barked, turned around, and ran back towards its owner, and so on. She ran back and forth until the hunters met. How many kilometers did she run?
It will be two hours before the hunters meet, during which time the dog ran 16 km.

## Answer

16 km.

Prove that if $a$ and $b$ are integers and $b \neq 0$, then there exists a unique pair of numbers $q$ and $r$ such that $a = bq + r, 0 \leq r < |b|$.