A function over factors
CodeChefOpen on judge ↗
A function f is defined over natural numbers as: f(N) = ∑ di μ(di) Here the summation is over di, all positive integers which are factors of N. μ(n) is the Möbius function defined in the following way: If there exists a prime p such that p2 is a factor of n, then μ(n)=0. Otherwise, if n has an odd number of prime factors, μ(n)=-1. If not, μ(n)=1. Thus the first few va
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