結果

問題 No.289 数字を全て足そう
ユーザー jcm_2
提出日時 2019-08-12 00:48:14
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 64 ms / 1,000 ms
コード長 269 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 43,008 KB
最終ジャッジ日時 2024-10-13 01:18:59
合計ジャッジ時間 2,287 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  const data = input.trim()
  let result = 0
  let chars = data.split('')
  chars.forEach(c => {
    if ('1' <= c && c <= '9') {
      result += parseInt(c)
    }
  })
  console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))
0