結果 : write an algorithm of big m method