Vasya Loves Divisors
CodeChefOpen on judge ↗
Vasya has got an array A consisting of N integers (1-indexed). He suddenly got an idea for generating another array B. The generation of elements of new array B, will take place in the following manner: - For each i in range[1, N], B(i) = product of all divisors of A(i) Hence, The new array B formed also has N elements. Now, Vasya is interested in such subarrays of B that have product of eleme
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