結果

問題 No.289 数字を全て足そう
ユーザー mukaihajimemukaihajime
提出日時 2019-08-10 20:29:38
言語 JavaScript
(node v21.7.1)
結果
RE  
実行時間 -
コード長 315 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 7,196 KB
実行使用メモリ 46,460 KB
最終ジャッジ日時 2024-04-21 02:53:14
合計ジャッジ時間 2,520 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
39,552 KB
testcase_01 AC 64 ms
39,296 KB
testcase_02 AC 63 ms
39,168 KB
testcase_03 RE -
testcase_04 AC 62 ms
39,168 KB
testcase_05 AC 64 ms
41,460 KB
testcase_06 AC 66 ms
39,040 KB
testcase_07 AC 71 ms
43,392 KB
testcase_08 AC 65 ms
43,264 KB
testcase_09 AC 64 ms
39,936 KB
testcase_10 AC 64 ms
43,264 KB
testcase_11 AC 63 ms
43,520 KB
testcase_12 AC 65 ms
43,904 KB
testcase_13 AC 63 ms
43,392 KB
testcase_14 AC 71 ms
43,648 KB
testcase_15 AC 65 ms
43,392 KB
testcase_16 AC 65 ms
43,264 KB
testcase_17 AC 65 ms
43,648 KB
testcase_18 AC 64 ms
43,776 KB
testcase_19 AC 66 ms
43,520 KB
testcase_20 AC 66 ms
43,264 KB
testcase_21 AC 61 ms
39,424 KB
testcase_22 AC 64 ms
43,776 KB
testcase_23 AC 69 ms
46,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const row = require('fs').readFileSync('/dev/stdin','utf8').split('\n');
const numbers = [];
const column = row[0].split('').map(e => {
    if(/\d/.test(e)) {
        numbers.push(Number(e));
    }
    return undefined;
});

const result = numbers.reduce((acc,cur) => {
    return acc + cur;
})
console.log(result);
0