結果

問題 No.289 数字を全て足そう
ユーザー swyroakswyroak
提出日時 2021-08-08 23:38:19
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 113 ms / 1,000 ms
コード長 367 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 40,424 KB
最終ジャッジ日時 2023-10-20 00:12:13
合計ジャッジ時間 4,625 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
37,680 KB
testcase_01 AC 66 ms
37,680 KB
testcase_02 AC 65 ms
37,680 KB
testcase_03 AC 66 ms
37,672 KB
testcase_04 AC 65 ms
37,680 KB
testcase_05 AC 66 ms
37,696 KB
testcase_06 AC 67 ms
37,688 KB
testcase_07 AC 66 ms
37,732 KB
testcase_08 AC 67 ms
37,728 KB
testcase_09 AC 69 ms
37,692 KB
testcase_10 AC 69 ms
37,700 KB
testcase_11 AC 67 ms
37,720 KB
testcase_12 AC 67 ms
37,740 KB
testcase_13 AC 68 ms
37,712 KB
testcase_14 AC 67 ms
37,744 KB
testcase_15 AC 65 ms
37,720 KB
testcase_16 AC 65 ms
37,708 KB
testcase_17 AC 66 ms
37,728 KB
testcase_18 AC 69 ms
37,744 KB
testcase_19 AC 68 ms
37,724 KB
testcase_20 AC 67 ms
37,728 KB
testcase_21 AC 67 ms
37,680 KB
testcase_22 AC 68 ms
37,740 KB
testcase_23 AC 113 ms
40,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict";
function Main(input) {
    const series = input.replace(/[^0-9]/g, '').split("").reduce((accum, current) => {
        return accum + Number(current);
    }, 0);
    console.log(series);
}
//テストの入力を受け取る
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//Main("1 3 4 5 6 7 8 9 10");
//# sourceMappingURL=index.js.map
0