結果
問題 |
No.2920 Blood Type
|
ユーザー |
|
提出日時 | 2024-10-12 14:39:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 53,816 KB |
最終ジャッジ日時 | 2024-10-12 14:39:20 |
合計ジャッジ時間 | 2,409 ms |
ジャッジサーバーID (参考情報) |
judge / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
from itertools import product S=list(input()) T=list(input()) ans={"A":0,"B":0,"O":0,"AB":0} for s,t in product(S,T): if (s=="A" and t=="B") or (s=="B" and t=="A"): ans["AB"]+=25 elif s=="A" or t=="A": ans["A"]+=25 elif s=="B" or t=="B": ans["B"]+=25 else: ans["O"]+=25 print (ans["A"],ans["B"],ans["AB"],ans["O"])