Luigi and Uniformity
Luigi has an array $A$ of $N$ positive integers. He wants to make all elements of the array **equal**. In one move, he can: - Choose an index $i$ $(1\le i \le N)$ and divide the element $A_i$ by **any one** of its [divisors](https://en.wikipedia.org/wiki/Divisor). In other words, he can choose a positive integer $X$ such that $X | A_i$ and set $A_i := \frac{A_i}{X}$. Find the **minimum** numb
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