The problem says the input is a positive integer but the first test inputs 0. In my code that caused r = 0/0 error. Please change the wording to "input is non-negative".
2934 Solvers
Flag largest magnitude swings as they occur
588 Solvers
Cell Counting: How Many Draws?
598 Solvers
Generate a random matrix A of (1,-1)
213 Solvers
416 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!