結果
| 問題 | 
                            No.289 数字を全て足そう
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-12-16 23:23:54 | 
| 言語 | TypeScript  (5.7.2)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 69 ms / 1,000 ms | 
| コード長 | 251 bytes | 
| コンパイル時間 | 8,836 ms | 
| コンパイル使用メモリ | 228,692 KB | 
| 実行使用メモリ | 43,136 KB | 
| 最終ジャッジ日時 | 2024-12-31 16:48:48 | 
| 合計ジャッジ時間 | 11,046 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
function Main(input: string): void {
  const nums = input.match(/\d/g);
  if (!!nums) {
    console.log(nums.reduce( (sum, str) => sum + parseInt(str), 0 ));
  } else {
    console.log(0);
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));