結果
| 問題 | No.2920 Blood Type | 
| コンテスト | |
| ユーザー |  norioc | 
| 提出日時 | 2025-02-05 01:56:30 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 58 ms / 2,000 ms | 
| コード長 | 394 bytes | 
| コンパイル時間 | 1,707 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 51,968 KB | 
| 最終ジャッジ日時 | 2025-02-05 01:56:36 | 
| 合計ジャッジ時間 | 5,493 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 36 | 
ソースコード
S = input()
T = input()
def f(a, b):
    s = {a, b}
    if 'A' in s and 'B' in s:
        return 'AB'
    if 'A' in s:
        return 'A'
    if 'B' in s:
        return 'B'
    return 'O'
res = {'A': 0, 'B': 0, 'AB': 0, 'O': 0}
for c1 in S:
    for c2 in T:
        res[f(c1, c2)] += 1
ans = []
for a in ['A', 'B', 'AB', 'O']:
    x = res[a] / 4 * 100
    ans.append(int(x))
print(*ans)
            
            
            
        