結果

問題 No.2920 Blood Type
コンテスト
ユーザー ゆにたりー卿
提出日時 2024-10-22 20:20:17
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 346 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 213 ms
コンパイル使用メモリ 85,396 KB
実行使用メモリ 53,920 KB
最終ジャッジ日時 2026-05-05 18:23:58
合計ジャッジ時間 4,076 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

S = input()
T = input()

probs = [0, 0, 0, 0]
A, B, AB, O = 0, 1, 2, 3

for s in S:
    for t in T:
        typ = {s, t}
        if 'A' in typ and 'B' in typ:
            probs[AB] += 25
        elif 'A' in typ:
            probs[A] += 25
        elif 'B' in typ:
            probs[B] += 25
        else:
            probs[O] += 25

print(*probs)
0