solved smallest multiple problem in python