← All problemsSign in

Height of Rationals

CodeChefRating 405Open on judge ↗

In a recent [breakthrough](https://www.quantamagazine.org/mathematicians-prove-30-year-old-andre-oort-conjecture-20220203/) in mathematics, the proof utilized a concept called `Height`. Consider a fraction $\frac{a}{b}$. Its `Height` is defined as the **maximum** of its numerator and denominator. So, for example, the `Height` of $\frac{3}{19}$ would be $19$, and the `Height` of $\frac{27}{4}$ wou

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start