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".
Swap the first and last columns
12666 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
795 Solvers
Is my wife right? Now with even more wrong husband
1244 Solvers
17308 Solvers
475 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!