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".
Make the vector [1 2 3 4 5 6 7 8 9 10]
36954 Solvers
Find common elements in matrix rows
1316 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
818 Solvers
358 Solvers
Fix the last element of a cell array
385 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!