結果

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

ソースコード

diff #

S = input()
T = input()

answers = [0, 0, 0, 0]

for s in S:
    for t in T:
        baby = [s, t]
        
        if "A" in baby and "B" not in baby:
            answers[0] += 25 # A型の場合
        
        elif "B" in baby and "A" not in baby:
            answers[1] += 25 # B型の場合
        
        elif "A" in baby and "B" in baby:
            answers[2] += 25 # AB型の場合
        
        else:
            answers[3] += 25 # O型の場合

print(*answers)
0