結果 : calculate time complexity of code