InterviewBit Academy is now Scaler!
Learn Tech Skills from Scratch @ Scaler EDGE

Smallest Multiple With 0 and 1

You are given an integer N. You have to find smallest multiple of N which consists of digits 0 and 1 only. Since this multiple could be large, return it in form of a string.


  • Returned string should not contain leading zeroes.

For example,

For N = 55, 110 is smallest multiple consisting of digits 0 and 1.
For N = 2, 10 is the answer.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Smallest Multiple With 0 and 1 on Interview Code Editor
Sign Up
to access hints and editorial solutions for Smallest Multiple With 0 and 1
Asked In:


Click here to start solving coding interview questions