You should not reinitialize the sum variable in the second loop, you should choose the largest value after each add arr[j] to sum.
確定! 回上一頁