← All problemsSign in

Guess Game

CodeChefRating 3273Open on judge ↗

An **ordered pair** $(A,B)$ is said to be *valid* iff $\max(A,B) = k\cdot \min(A,B)$, where $k \gt 1$. Let $S(N)$ denote the set of all *valid pairs* $(A,B)$ where $(1 \leq A,B \leq N)$. Carol chooses a *valid pair* $(A,B)$ from $S(N)$ **randomly** and plays `Guess Game` with Alice and Bob. She will tell: - The value $A$ to Alice; - The value $B$ to Bob; - The condition $(A,B)$ is a *valid pa

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