結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー yuzu32ut
提出日時 2022-02-27 19:07:48
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 22,327 ms
コンパイル使用メモリ 384,308 KB
実行使用メモリ 7,244 KB
最終ジャッジ日時 2024-07-05 18:39:15
合計ジャッジ時間 18,818 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

fn read() -> Vec<u64> {
    fn read_line() -> String {
        let mut buf = String::new();
        std::io::stdin().read_line(&mut buf).unwrap();
        buf.trim().to_owned()
    }
    let _ = read_line();
    read_line()
        .split_ascii_whitespace()
        .map(|e| e.parse().unwrap())
        .collect()
}

fn main() {
    let a = read();
    println!("{}", a.iter().sum::<u64>());
}
0