The Optimal Pairs
For two positive integers $a$ and $b$, let $g(a, b) =$ [gcd](https://en.wikipedia.org/wiki/Greatest_common_divisor) $(a, b) +$ [lcm](https://en.wikipedia.org/wiki/Least_common_multiple)$(a, b)$. For a positive integer $N$, let $f(N)$ denote the **minimum** value of $g(a, b)$ over all the pairs of positive integers $(a, b)$ such that $a+b = N$. Find out the number of **ordered** pairs $(a, b)$ s
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.
Sign in to chat with the tutor and save your progress.
Sign in to start