← All problemsSign in

Party

Atsi and Shaka have been invited to the birthday party of their friend Abed. $N$ people were invited to the party and were given seat numbers.(All seats are in the same row). Since Atsi and Shaka weren't given their seat numbers beforehand they decided to calculate the probability of them being allotted adjacent seats. They calculated the probability to be $P/Q$. Since Atsi and Shaka like pl

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