結果
問題 |
No.1129 Rating じゃんけん
|
ユーザー |
![]() |
提出日時 | 2020-08-05 10:43:31 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 736 bytes |
コンパイル時間 | 11,342 ms |
コンパイル使用メモリ | 376,620 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 03:06:21 |
合計ジャッジ時間 | 12,503 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 14 WA * 2 |
コンパイルメッセージ
warning: value assigned to `ans` is never read --> src/main.rs:10:13 | 10 | let mut ans = "Draw"; | ^^^ | = help: maybe it is overwritten before being read? note: the lint level is defined here --> src/main.rs:1:8 | 1 | #[warn(unused_assignments)] | ^^^^^^^^^^^^^^^^^^
ソースコード
#[warn(unused_assignments)] fn main() { let mut abcd = String::new(); std::io::stdin().read_line(&mut abcd).ok(); let abcd: Vec<i32> = abcd.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let a = abcd[0]; let b = abcd[1]; let c = abcd[2]; let d = abcd[3]; let mut ans = "Draw"; if a < c { ans = "tRue"; println!("{}", ans); } else if a > c { ans = "null"; println!("{}", ans); } else { if b > d { ans = "null"; println!("{}", ans); } else if b < d { ans = "tRue"; println!("{}", ans); } else { ans = "Draw"; println!("{}", ans); } } }