結果

問題 No.2920 Blood Type
ユーザー 👑 loop0919
提出日時 2024-06-14 00:29:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 82,256 KB
実行使用メモリ 53,644 KB
最終ジャッジ日時 2024-06-14 00:29:26
合計ジャッジ時間 3,552 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
T = input()

P_A, P_B, P_AB, P_O = 0, 0, 0, 0

for s in S:
    for t in T:
        if 'A' in {s, t} and 'B' not in {s, t}:
            P_A += 25
        elif 'B' in {s, t} and 'A' not in {s, t}:
            P_B += 25
        elif 'A' in {s, t} and 'B' in {s, t}:
            P_AB += 25
        else:
            P_O += 25

print(P_A, P_B, P_AB, P_O)
0