← All problemsSign in

Prime Factors and Ranges

For a positive integer $N$, lets define $PFS(N)$ as a set of prime factors of $N$. $|PFS(N)|$ denotes number of elements present in $PFS(N)$. Lets define a *function* $cpf(N,m)$ for some non-negative integer $m$ as, $cpf(N,m) =$ $\begin{cases} 1 \space; & \text{$|PFS(N)| = m$} \\ 0 \space; & otherwise \end{cases}$ For given integers $L$, $R$ and $k$, find the value of $\sum_{i = L}

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