Problem 84. Longest Divisor Run
Solution Stats
Problem Comments
-
1 Comment
Brandon
on 21 Jun 2023
A lot of the smaller answers use gcd, which fails for a=[2 4 6 9 18 21]. This is because the gcd of 9 and 18 is 9, but for 6 and 9 it's 3, which throws off the tally count because 3 is also common between 9 and 18.
Solution Comments
Show commentsProblem Recent Solvers1122
Suggested Problems
-
3242 Solvers
-
247 Solvers
-
Getting the indices from a vector
7871 Solvers
-
Magic is simple (for beginners)
7316 Solvers
-
594 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!