結果
| 問題 |
No.9001 標準入出力の練習問題(テスト用)
|
| ユーザー |
|
| 提出日時 | 2019-03-22 18:09:44 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,375 bytes |
| コンパイル時間 | 12,806 ms |
| コンパイル使用メモリ | 384,528 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-09-19 02:30:09 |
| 合計ジャッジ時間 | 13,449 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 2 |
ソースコード
macro_rules! get {
($t:ty) => {
{
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse::<$t>().unwrap()
}
};
($($t:ty),*) => {
{
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
(
$(iter.next().unwrap().parse::<$t>().unwrap(),)*
)
}
};
($t:ty; $n:expr) => {
(0..$n).map(|_|
get!($t)
).collect::<Vec<_>>()
};
($($t:ty),*; $n:expr) => {
(0..$n).map(|_|
get!($($t),*)
).collect::<Vec<_>>()
};
($t:ty ;;) => {
{
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.split_whitespace()
.map(|t| t.parse::<$t>().unwrap())
.collect::<Vec<_>>()
}
};
($t:ty ;; $n:expr) => {
(0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()
};
}
fn main() {
// 一行読み込み、空白で分解してusize2つパースする
let (n, q, s) = get!(usize, usize, String);
println!("{} {}", n + q, s)
}