結果
問題 | No.1511 A ? B Problem |
ユーザー |
|
提出日時 | 2021-05-21 21:32:32 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 518 bytes |
コンパイル時間 | 18,500 ms |
コンパイル使用メモリ | 388,448 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 07:53:21 |
合計ジャッジ時間 | 14,012 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 |
コンパイルメッセージ
warning: function `input` is never used --> src/main.rs:9:4 | 9 | fn input<T: std::str::FromStr>() -> T { | ^^^^^ | = note: `#[warn(dead_code)]` on by default
ソースコード
fn main() { let (a, b) : (u32, u32) = input_t(); println!("{}", (a|b) - (a&b)) } fn input<T: std::str::FromStr>() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn input_t<T: std::str::FromStr, U: std::str::FromStr>() -> (T, U) { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim().split_whitespace().collect::<Vec<&str>>(); (s[0].parse().ok().unwrap(), s[1].parse().ok().unwrap()) }