An integer whose base-ten representation consists of only zero and one is called a "zero-one". given an arbitrary integer N, find the smallest "zero-one" integer S which is the multiple of N. (It is mathematically guaranteed that every N has such an S). Constraint: 0 < N < 100,000 Sample Input: 4 Sample Output: 100
Anonymous
i=1 while True: if int(bin(i)[2:])%n==0: return int(bin(i)[2:]) i+=1
Check out your Company Bowl for anonymous work chats.