Find the smallest integer m such that n divides m! - MATLAB Cody - MATLAB Central

Problem 51950. Find the smallest integer m such that n divides m!

Difficulty:Rate
Write a function that takes an integer n and finds the smallest integer m whose factorial is divisible by n. For example, if n = 10, then the smallest factorial that is a multiple of n is 5! = 120; therefore, m = 5.

Solution Stats

41.86% Correct | 58.14% Incorrect
Last Solution submitted on Nov 10, 2024

Problem Comments

Solution Comments

Show comments
MATLAB Central 2024 In Review
...
Let's celebrate what made 2024 memorable! Together, we made big impacts, hosted...

Problem Recent Solvers15

Suggested Problems

More from this Author288

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page