Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (19 sloc) 984 Bytes
#!/usr/bin/env python3
###########################################################################
# script name: ch-1.py #
# #
# https://perlweeklychallenge.org/blog/perl-weekly-challenge-049/ #
# #
# Smallest Multiple #
# Write a script to accept a positive number as command line argument #
# and print the smallest multiple of the given number consists of digits #
# 0 and 1. #
# #
###########################################################################
import sys
import re
num = int(sys.argv[1])
add = num
while re.search(r'[^01]',str(num)):
num += add
print(num)
You can’t perform that action at this time.