Input
Two positive integers a > b
Output
The smallest integer c >= a
so that c
can be factored into two parts with one part an integer power of two (that is at least two) and the other part no larger than b
.
Examples
If b = 100
and a = 101
, then the output should be 102 as 102 is 2 times 51.
For the same b
, if a = 201
then the output should be 204 as that equals 4 times 51.
For the same b
, if a = 256
then the output should be 256.