Shlok Loves Expectation
CodeChefOpen on judge ↗
One day Shlok saw an array $A$ of $N$ integers in his dream. So he started playing with the array since he loves arrays. He likes co-prime subsets , so he randomly chooses a **co-prime subset** and **sums** it . Now he wonders what is the **expected sum value** he can get doing this experiment. He is stuck in his dream of expectation and he cannot wake up till he finds the expected value. Sinc
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