結果
| 問題 | No.289 数字を全て足そう | 
| コンテスト | |
| ユーザー |  bubo | 
| 提出日時 | 2018-03-03 18:05:12 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 261 bytes | 
| コンパイル時間 | 13,195 ms | 
| コンパイル使用メモリ | 385,776 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-30 04:44:55 | 
| 合計ジャッジ時間 | 14,208 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
use std::io::stdin;
pub fn main() {
    let s = {
        let mut buf = String::new();
        let _ = stdin().read_line(&mut buf);
        buf
    };
    let sum: usize = s.chars().flat_map(|x| x.to_string().parse::<usize>()).sum();
    println!("{}", sum);
}
            
            
            
        