Special Event
CodeChefOpen on judge ↗
There are two integers $A$ and $B$. In one move, Darshan can perform one of the following moves: 1. $A = B - A$ 2. $B = A - B$ 3. $A = \lfloor{B / A}\rfloor,$ if $A \neq 0$ 4. $B = \lfloor{A / B}\rfloor,$ if $B \neq 0$ Whenever $A$ becomes equal to $B$, this event is called a "special event". Print "YES" if the **very first special event** can take place immediately after performing the $K$th mov
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