COPRIMES
CodeChefOpen on judge ↗
*Motherboard*, the evil mother of our *Farzi coder* has gifted him an Array **A[]** of size **N**. She wanted to test the coding skills of her son. So she asked him **Q** questions of the form: given three integers (**L, R, K**), find the number of special subsets of size **K** of the subarray **A[L], A[L+1], .... A[R]**. A set is special if the greatest number which can divide all the elements of
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