Cody

Problem 1071. Next Lower Power of B

Solution 173142

Submitted on 5 Dec 2012
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   Fail
%% assert(lastpowb(2,9) == 3)

Error: You may not use the command(s) str2func in your code

2   Fail
%% assert(lastpowb(3,242) == 4)

Error: You may not use the command(s) str2func in your code

3   Fail
%% assert(lastpowb(4,259) == 4)

Error: You may not use the command(s) str2func in your code

4   Fail
%% assert(lastpowb(5,26) == 2)

Error: You may not use the command(s) str2func in your code

5   Fail
%% assert(lastpowb(6,1) == 0)

Error: You may not use the command(s) str2func in your code

6   Fail
%% assert(lastpowb(7,347) == 3)

Error: You may not use the command(s) str2func in your code

7   Fail
%% assert(lastpowb(8,32763) == 4)

Error: You may not use the command(s) str2func in your code

8   Fail
%% assert(lastpowb(9,729) == 3)

Error: You may not use the command(s) str2func in your code

9   Fail
%% assert(lastpowb(10,7) == 0)

Error: You may not use the command(s) str2func in your code

10   Fail
%% assert(lastpowb(11,18) == 1)

Error: You may not use the command(s) str2func in your code

11   Fail
%% assert(lastpowb(12,145) == 2)

Error: You may not use the command(s) str2func in your code

12   Fail
%% assert(lastpowb(13,16) == 1)

Error: You may not use the command(s) str2func in your code

13   Fail
%% assert(lastpowb(14,201) == 2)

Error: You may not use the command(s) str2func in your code

14   Fail
%% assert(lastpowb(15,50633) == 4)

Error: You may not use the command(s) str2func in your code

15   Fail
%% assert(lastpowb(16,4083) == 2)

Error: You may not use the command(s) str2func in your code

16   Fail
%% assert(lastpowb(17,304) == 2)

Error: You may not use the command(s) str2func in your code

17   Fail
%% assert(lastpowb(18,30) == 1)

Error: You may not use the command(s) str2func in your code

18   Fail
%% assert(lastpowb(19,6878) == 3)

Error: You may not use the command(s) str2func in your code

19   Fail
%% assert(lastpowb(20,18) == 0)

Error: You may not use the command(s) str2func in your code

20   Fail
%% assert(lastpowb(21,41) == 1)

Error: You may not use the command(s) str2func in your code

21   Fail
%% assert(lastpowb(22,35) == 1)

Error: You may not use the command(s) str2func in your code

22   Fail
%% assert(lastpowb(23,6436360) == 5)

Error: You may not use the command(s) str2func in your code

23   Fail
%% assert(lastpowb(24,20) == 0)

Error: You may not use the command(s) str2func in your code

24   Fail
%% assert(lastpowb(25,641) == 2)

Error: You may not use the command(s) str2func in your code