結果 : time complexity using substitution method