結果

問題 No.2920 Blood Type
ユーザー toshiro_yanagi
提出日時 2025-04-02 04:02:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-04-02 04:02:46
合計ジャッジ時間 2,991 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict


def fun(s, t):
    dic = defaultdict(int)
    for si in s:
        for ti in t:
            it = [*{si, ti} - {"O"}]
            it.sort()
            it = "".join(it)
            it = "O" if it == "" else it
            dic[it] += 1
    res = []
    for it in "A,B,AB,O".split(","):
        res += [dic[it] * 25]
    return " ".join(f"{it}" for it in res)


st = [input() for _ in range(2)]
print(fun(*st))
0