結果

問題 No.289 数字を全て足そう
ユーザー yun_app
提出日時 2016-05-11 16:34:43
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 78 ms / 1,000 ms
コード長 325 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 44,800 KB
最終ジャッジ日時 2024-10-12 23:42:49
合計ジャッジ時間 2,541 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
    main(chunk.trim());
});
function main(chunk){
    // your code goes here
    chunk = chunk.replace(/[^0-9]/g,"");
    var ans = 0;
    for(var i in chunk){
        ans += Number(chunk[i]);
    }
    console.log(ans);
}
0