結果
| 問題 | No.289 数字を全て足そう | 
| コンテスト | |
| ユーザー |  mottodora | 
| 提出日時 | 2016-10-16 17:51:01 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 11 ms / 1,000 ms | 
| コード長 | 368 bytes | 
| コンパイル時間 | 12,780 ms | 
| コンパイル使用メモリ | 406,740 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-22 12:04:12 | 
| 合計ジャッジ時間 | 13,256 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
fn getline() -> String{
    let mut ret = String::new();
    std::io::stdin().read_line(&mut ret).ok();
    return ret;
}
fn extract_int_sum(string: &str) -> i32 {
    string.chars().filter(|x| x.is_numeric())
        .map(|x| x.to_string().parse::<i32>().unwrap())
        .sum()
}
fn main() {
    let s = getline();
    println!("{}", extract_int_sum(s.trim()));
}
            
            
            
        