結果
問題 |
No.1047 Zero (Novice)
|
ユーザー |
|
提出日時 | 2022-11-29 00:22:13 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 12,022 ms |
コンパイル使用メモリ | 400,816 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 03:14:24 |
合計ジャッジ時間 | 13,032 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
fn main() { let mut ab = String::new(); std::io::stdin().read_line(&mut ab).ok(); let ab: Vec<isize> = ab.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let a = ab[0]; let b = ab[1]; if b == 0 { println!("1"); return; } else if a == 0 { println!("-1"); return; } if a == -1 { println!("2"); } else { println!("-1"); } }