← All problemsSign in

Friendly Pairs

For a real number $x$, $\lceil x \rceil$ denotes the smallest integer $\geq x$ and $\lfloor x \rfloor$ denotes the greatest integer $\leq x$. Given two positive integers $C$ and $K$, we call a pair of integers $(x, y)$ friendly if $x \gt 0, y \gt 0$ and $x\lceil y\sqrt{K} \rceil = y\lfloor x\sqrt{K} \rfloor+C$. Find all ordered pair of positive integers $(u, v)$ where $u$ and $v$ can be arb

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