Smallest multiple of N with exactly N digits in its Binary number representation | Function to find smallest multiple of n with exactly n digits in Binary number representation . ; Driver code
function smallestNumber ( N ) { document . write ( N * parseInt ( Math . ceil ( Math . pow ( 2 , ( N - 1 ) ) / N ) ) ) ; } let N = 3 ; smallestNumber ( N ) ;