結果

問題 No.2920 Blood Type
コンテスト
ユーザー wgrape
提出日時 2024-10-17 09:41:45
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 416 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 236 ms
コンパイル使用メモリ 84,940 KB
実行使用メモリ 53,864 KB
最終ジャッジ日時 2026-05-05 13:54:26
合計ジャッジ時間 2,453 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

S = input()
T = input()

PA = 0
PB = 0
PAB = 0
PO = 0

for s in S:
    for t in T:
        types = set()
        types.add(s)
        types.add(t)
        if "A" in types and "B" not in types:
            PA += 25
        elif "B" in types and "A" not in types:
            PB += 25
        elif "A" in types and "B" in types:
            PAB += 25
        else:
            PO += 25
            
print(PA,PB,PAB,PO)
0