結果
問題 | No.2920 Blood Type |
ユーザー |
|
提出日時 | 2024-10-12 14:37:02 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 743 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 55,508 KB |
最終ジャッジ日時 | 2024-10-12 14:37:05 |
合計ジャッジ時間 | 2,618 ms |
ジャッジサーバーID (参考情報) |
judge / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
from collections import defaultdictimport sysinput = sys.stdin.readlineS = input().strip()T = input().strip()D = defaultdict(int)for s in S:for t in T:tmp = {s, t}if "A" in tmp and "B" in tmp:if "AB" not in D:D["AB"] = 25else:D["AB"] += 25elif "A" in tmp:if "A" not in D:D["A"] = 25else:D["A"] += 25elif "B" in tmp:if "B" not in D:D["B"] = 25else:D["B"] += 25else:if "O" not in D:D["O"] = 25else:D["O"] += 25print(D["A"], D["B"], D["AB"], D["O"])