30:00
Given a positive integer n, return the smallest positive integer that is a multiple of both 2 and n.
1≤n≤1501 \leq n \leq 1501≤n≤150
Run code to see results.
Find the smallest positive number divisible by both 2 and 5, that is lcm(2, 5).
n % 2 = ?
lcm(2, n) = 2 · n / gcd(2, n) = 2 · 5 / 1
Given a positive integer n, return the smallest positive integer divisible by both 2 and n.