← All problemsSign in

Primal Function

Problem Statement The primal of n, pri(n) is the product of the distinct prime factors of a given number. For example, 504 = 2^3 x 3^2 x 7, so pri(504) = 2 x 3 x 7 = 42. Let E(k) be the kth element in the sorted list of primals of all x where 1 Input - First line contains the value of q, the number of queries. - Each of the q lines contains a pair of integers n and k, separated by space. Out

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