Exponents
CodeChefOpen on judge ↗
For a number x, S(x) denotes the sum of all the exponents of the primes in its prime factorization. For example, S(15) = 3^1 x 5^1 = 2 Given two numbers p and q, find the sum of S(x) where x = p, p+1, …, q for all the given test cases. For example, if p and q are 5 and 7, output S(5) + S(6) + S(7) Input The first line of the input contains the number of test cases T. The next T lines of input
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