結果
| 問題 | No.289 数字を全て足そう | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-12-11 22:57:44 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 322 bytes | 
| コンパイル時間 | 15,824 ms | 
| コンパイル使用メモリ | 387,116 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-24 08:06:28 | 
| 合計ジャッジ時間 | 14,939 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
fn main() {
    let stdin = std::io::stdin();
    let mut buf = String::new();
    stdin.read_line(&mut buf).ok();
    let mut result: i32 = 0;
    for i in buf.as_str().chars() {
        result += match i {
            '0'..='9' => i as i32 - 48,
            _ => continue,
        }
    }
    println!("{}", result);
}
            
            
            
        