LCD
The *lowest common divisor* (LCD) of a sequence of $k$ integers $(x_1, x_2, \ldots, x_k)$ is the **smallest** integer $d$ such that: - $d\gt 1$, and - $d$ is a **divisor** of $x_i$ for all $1\le i \le k$. If no such integer $d$ exists, the LCD of the sequence is defined to be $1$. For example, - The LCD of $(6, 15, 6, 21)$ is $3$. - The LCD of $(9, 9)$ is $3$. - The LCD of $(10, 20)$ is $2$. -
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