結果

問題 No.2920 Blood Type
ユーザー kmmtkm
提出日時 2024-10-12 14:36:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 603 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 82,644 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-10-12 14:36:18
合計ジャッジ時間 2,685 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict


def debug(*args):
    print(*args, file=sys.stderr)

s = input()
t = input()

dd = defaultdict(int)
for i in range(2):
    for j in range(2):
        x = set()
        x.add(s[i])
        x.add(t[j])
        
        if 'A' in x and 'B' not in x:
            dd['A'] += 1
        elif 'A' not in x and 'B' in x:
            dd['B'] += 1
        elif 'A' in x and 'B' in x:
            dd['AB'] += 1
        else:
            dd['O'] += 1

ans = []
ans.append(dd['A']*25)
ans.append(dd['B']*25)
ans.append(dd['AB']*25)
ans.append(dd['O']*25)

print(*ans)
0