結果

問題 No.289 数字を全て足そう
ユーザー mukaihajime
提出日時 2019-08-10 20:29:38
言語 JavaScript
(node v23.5.0)
結果
RE  
実行時間 -
コード長 315 bytes
コンパイル時間 27 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 45,800 KB
最終ジャッジ日時 2024-10-13 01:17:19
合計ジャッジ時間 2,181 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 RE * 1
権限があれば一括ダウンロードができます

ソースコード

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