Cody

Solution 2465843

Submitted on 3 Jun 2020 by Tim
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = 241; y_correct = 255; assert(isequal(NextBinaryPalindrome(x),y_correct))

2   Pass
x = 2020; y_correct = 2047; assert(isequal(NextBinaryPalindrome(x),y_correct))

3   Pass
x = 10051; y_correct =10233; assert(isequal(NextBinaryPalindrome(x),y_correct))

4   Pass
x =40504; y_correct =40569; assert(isequal(NextBinaryPalindrome(x),y_correct))