The Smallest Number

Published by yanni in

Given a positive integer n, implement a function that finds the smallest number that is evenly divisible by the integers 1 through n inclusive.

Examples

smallest(1) ➞ 1

smallest(5) ➞ 60

smallest(10) ➞ 2520

smallest(20) ➞ 232792560

Notes

N/A

Watch a quick demo on how Edabit works.