Missing Numbers
Alice (uniformly and independently) randomly picks two integers $a, b$ from the range $[1,10^4]$, and writes down the values of $a + b$, $a - b$, $a \cdot b$ and $\lfloor \frac{a}{b} \rfloor$ (integer division) in some random order. Unfortunately, she forgot the values of $a$ and $b$. You need to help her to find out if there exists two integers $a, b$ such that $1 \leq a, b \leq 10^4$ and $a + b$
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