Problem 1 · Counting houses around the square
Two shifted counts: the constant offset closes the circle.
Integer answer, at most 4 digitsMaria and Joan walk together around a circular square, counting the houses surrounding it. They start counting at different points. Maria's fifth house is Joan's twelfth, and Joan's fifth house is Maria's thirtieth. How many houses are there around the square?
Copa Cangur · SCM
Medium
Closed answer
Reasoned solution
Key idea: they walk together, so their counts differ by a constant offset modulo $n$, the number of houses.
Maria's fifth house is Joan's twelfth: Joan's count runs $7$ ahead. Hence the house that is Maria's number $30$ is Joan's number $37$.
But that same house is Joan's fifth: going around the square, $37$ and $5$ label the same house.
$$37 \equiv 5 \pmod{n} \;\Longrightarrow\; n \mid 32.$$
Since Maria counts $30$ distinct houses, we need $n > 30$: the only option is $n = 32$.
Answer: 32