It is known that once you write the sequence 10101...101 long enough, the number will be finally divisible by any odd number if it is NOT a multiple of 5. Input an odd number(not divisible by 5), count how many 1's you need to write.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers12
Suggested Problems
-
Construct an index vector from two input vectors in vectorized fashion
448 Solvers
-
Find Index of maximum Value and maximum Value of a vector
167 Solvers
-
192 Solvers
-
Find smallest number to leave a remainder of 1
48 Solvers
-
Concatenate input positive integers to obtain a maximum.
43 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!