結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー mtwtkman
提出日時 2019-10-13 16:07:59
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 390 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,859 ms
コンパイル使用メモリ 196,508 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-26 05:50:46
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use std::io::{self, Read};

fn read_stdin<'a>() -> Vec<String> {
    let mut buffer = String::new();
    io::stdin().read_to_string(&mut buffer).ok();
    buffer.trim().split('\n').map(|s| s.to_string()).collect()
}

fn main() {
    let input = read_stdin();
    let result = &input[0].split(' ').map(|s| s.parse::<i32>().unwrap()).sum::<i32>();
    println!("{} {}", result, &input[1]);
}
0