結果 : smallest common denominator algorithm