Cody

# Problem 1071. Next Lower Power of B

Solution 1915312

Submitted on 29 Aug 2019
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)

y = 3.1699

Assertion failed.

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

y = 4.9962

Assertion failed.

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

y = 4.0084

Assertion failed.

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

y = 2.0244

Assertion failed.

5   Pass
assert(lastpowb(6,1) == 0)

y = 0

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

y = 3.0060

Assertion failed.

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

y = 4.9999

Assertion failed.

8   Pass
assert(lastpowb(9,729) == 3)

y = 3

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

y = 0.8451

Assertion failed.

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

y = 1.2054

Assertion failed.

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

y = 2.0028

Assertion failed.

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

y = 1.0810

Assertion failed.

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

y = 2.0095

Assertion failed.

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

y = 4.0001

Assertion failed.

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

y = 2.9989

Assertion failed.

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

y = 2.0179

Assertion failed.

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

y = 1.1767

Assertion failed.

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

y = 3.0009

Assertion failed.

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

y = 0.9648

Assertion failed.

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

y = 1.2198

Assertion failed.

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

y = 1.1502

Assertion failed.

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

y = 5.0000

Assertion failed.

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

y = 0.9426

Assertion failed.

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

y = 2.0079

Assertion failed.