結果
| 問題 | No.441 和か積 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-07 18:46:38 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 534 bytes |
| 記録 | |
| コンパイル時間 | 890 ms |
| コンパイル使用メモリ | 192,980 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-02-07 18:47:01 |
| 合計ジャッジ時間 | 3,117 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let a: String = stdin.next().unwrap().parse().unwrap();
let b: String = stdin.next().unwrap().parse().unwrap();
println!("{}", output(solve(a, b)));
}
fn solve(a: String, b: String) -> char {
match (&a[..], &b[..]) {
("0", "0") | ("2", "2") => 'E',
("0", _) | (_, "0") | ("1", _) | (_, "1") => 'S',
_ => 'P',
}
}
fn output(ans: char) -> char {
ans
}