結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー test
提出日時 2022-11-14 21:09:55
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 54 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 39,168 KB
最終ジャッジ日時 2024-09-15 23:39:01
合計ジャッジ時間 2,588 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

function chkInt(str) {
    if (isNaN(str)) return 0;
    return parseInt(str);
}
function Main(input) {
    let src = input.replace("\n", "").split("");
    let sum = 0;
    src.forEach(str => { sum += chkInt(str); });
    console.log(sum);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0