結果

問題 No.1096 Range Sums
ユーザー i524i524
提出日時 2020-07-20 14:22:40
言語 TypeScript
(5.4.3)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 6,014 ms
コンパイル使用メモリ 251,416 KB
実行使用メモリ 65,140 KB
最終ジャッジ日時 2023-09-03 16:24:17
合計ジャッジ時間 8,258 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
42,216 KB
testcase_01 AC 64 ms
42,228 KB
testcase_02 AC 65 ms
42,360 KB
testcase_03 AC 64 ms
42,276 KB
testcase_04 AC 63 ms
42,444 KB
testcase_05 AC 65 ms
42,192 KB
testcase_06 AC 66 ms
42,384 KB
testcase_07 AC 65 ms
42,220 KB
testcase_08 AC 69 ms
42,312 KB
testcase_09 AC 67 ms
42,356 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(' ');

console.log(numbers.map((v, i) => v * (i + 1) * (n - i)).reduce((a, b) => a + b, 0));
0