Click here to read the complete problem statement.
Seeking attentions of @gonitzoggoteam
(9,13) is not the only solution. For the sake of minimization, we can assume that \frac{m}{k} \approx\frac{49}{34}. Continued fraction decomposition of \frac{49}{34} gives:
\frac{49}{34}=1+\frac{15}{34}
=1+\frac{1}{\frac{34}{15}}
=1+\frac{1}{2+\frac{4}{15}}
=\cdots \cdots \cdots
=1+\frac{1}{2+\frac{1}{3+\frac{1}{1+\frac{1}{3}}}}
Now , for better approximation, replace the \frac{1}{3} at the very end part of the continued fraction with \frac{1}{2} to get \frac{m}{k}=\frac{36}{25} giving (25,36) as a valid solution for (k.m). To verify the answer, check if |(49k-34m)| is minimized with (25,36)