Minimum Common Multiple Algorithm