← All problemsSign in

Ayush vs Abhimanyu

Abhimanyu and Ayush have recently learned short range pistol shooting during their winter vacations. Now, Ayush has challenged Abhimanyu for a match to prove his mettle. During the match, they will try to shoot the target in turns. Ayush will shoot first. The probability of shooting the target each time is p/q for Ayush while r/s for Abhimanyu. The one who shoots at the target first will win the

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