能帮忙看看为什么才20吗
const { readline, print } = require("@ip-algorithmics/codeforces-io"); function calculateResult(n, a) { const MOD = 1e9 + 7; let result = 0; let tmp = 0; for (let i = 0; i < n; i++) { tmp += (i + 1); result += (a[i] * tmp * (n - i) % MOD); result %= MOD; } return result; } let nums = readline(); let line = readline(); let arr = line.split(" ").map(Number); print(calculateResult(nums, arr));