結果

問題 No.441 和か積
コンテスト
ユーザー elphe
提出日時 2026-02-07 18:45:10
言語 Rust
(1.93.0 + proconio + num + itertools)
結果
WA  
実行時間 -
コード長 557 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 20,464 ms
コンパイル使用メモリ 198,492 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-02-07 18:45:33
合計ジャッジ時間 4,793 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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 {
    if a == b {
        'E'
    } else {
        match (&a[..], &b[..]) {
            ("0", _) | (_, "0") | ("1", _) | (_, "1") => 'S',
            _ => 'P',
        }
    }
}

fn output(ans: char) -> char {
    ans
}
0