Shriha And Socks
CodeChefOpen on judge ↗
There are $N$ pair of socks in an almirah (i.e. 2*$N$ socks in all). Shriha takes out 4 socks (**not** 4 pairs) for her sister from the almirah. Let's say the probability that the number of pairs of socks present in those 4 taken out socks is $J$ ( where $ 0 \leq J \leq 2 $ ) is given by $P$. $P$ can be represented in the form $a/b$, where $a$ and $b$ are coprime. Your task is to output $a/b$ modu
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