結果
| 問題 | No.9001 標準入出力の練習問題(テスト用) |
| ユーザー |
|
| 提出日時 | 2022-02-27 15:00:32 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 1,050 bytes |
| 記録 | |
| コンパイル時間 | 11,692 ms |
| コンパイル使用メモリ | 377,904 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 14:42:47 |
| 合計ジャッジ時間 | 12,479 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 |
ソースコード
pub mod ut {
#[inline]
pub fn read_string() -> String {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
buf.trim().to_string()
}
#[inline]
pub fn read_single<T>() -> T
where
T: std::str::FromStr,
<T as std::str::FromStr>::Err: std::fmt::Debug,
{
let buf = read_string();
buf.parse().unwrap()
}
#[inline]
pub fn read_vector<T>() -> Vec<T>
where
T: std::str::FromStr,
<T as std::str::FromStr>::Err: std::fmt::Debug,
{
read_string()
.split_ascii_whitespace()
.map(|e| e.parse().unwrap())
.collect()
}
#[inline]
pub fn read_two_values<T>() -> (T, T)
where
T: std::str::FromStr + Copy,
<T as std::str::FromStr>::Err: std::fmt::Debug,
{
let v = read_vector();
(v[0], v[1])
}
}
fn main() {
let (a, b) = ut::read_two_values::<usize>();
let s = ut::read_string();
println!("{} {}", a + b, s);
}