Python. 方法2:. 不使用任何函数,通过遍历数组元素并累加;. arr = [1,2,3,4,5] ans = 0 for i in arr: ans += i print ('Sum of the array is ' ...
確定! 回上一頁