結果

問題 No.1096 Range Sums
ユーザー i524i524
提出日時 2020-07-20 14:26:24
言語 TypeScript
(5.4.3)
結果
WA  
実行時間 -
コード長 226 bytes
コンパイル時間 10,959 ms
コンパイル使用メモリ 252,776 KB
実行使用メモリ 49,420 KB
最終ジャッジ日時 2023-09-03 16:23:57
合計ジャッジ時間 11,621 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
42,376 KB
testcase_01 AC 68 ms
44,432 KB
testcase_02 AC 67 ms
42,224 KB
testcase_03 AC 66 ms
42,376 KB
testcase_04 AC 68 ms
42,228 KB
testcase_05 AC 69 ms
42,224 KB
testcase_06 AC 70 ms
42,220 KB
testcase_07 AC 67 ms
42,352 KB
testcase_08 AC 68 ms
42,228 KB
testcase_09 AC 67 ms
42,220 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

const [n, l] = require("fs").readFileSync("/dev/stdin", "utf8").split('\n');
const numbers = l.trim().split(' ');

let sum = 0;
for (let i = 0; i < n; i++) {
    sum = sum + numbers[i] * (i + 1) * (n - i);
}
console.log(sum);
0