A fenced, rectangular meadow has dimensions $24$ m by $52$ m. A mathematical farmer has $2019$ m of fence that he wants to use to fence the outside of the field and to partition the field into identical square plots with sides parallel to the edges of the field. Determine the largest possible number of square plots into which she can divide the field and how much fencing would be left over.
For the part of field already fenced, I can partition it into 4 by 4 squares as gcd(24, 52)=4. And then I can partition the 4 by 4 squares into smaller squares. But I don't know how much fence I should use to fence the outside of the field.
The right and the bottom edge of the meadow together need $76$ m of fencing, so that there are $2019-76=1943$ m of fencing left to fence the left and top edges of the little squares.
If there are $n$ squares of side length $s$ along the long side of the meadow and $m$ squares along the short side then we necessarily have ${n\over m}={13\over6}$, hence $$n=13k ,\quad m=6k,\quad s={4\over k}$$ for a certain $k\in{\mathbb N}_{\geq1}$. In this way we obtain $78k^2$ little squares, which need $$78k^2\cdot 2s=624 k\leq1943$$ meters of individual fencing. The largest admissible $k$ is $3$, so that we obtain $702$ little squares, and $71$m of fencing are left over.