結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:40:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 410 bytes |
| コンパイル時間 | 431 ms |
| コンパイル使用メモリ | 81,896 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-10-12 14:40:50 |
| 合計ジャッジ時間 | 2,559 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
S = list(input())
T = list(input())
A, B, AB, O, all = 0, 0, 0, 0, 4
for Si in S:
for Ti in T:
child = set(Si+Ti)
if "A" in child and not "B" in child:
A += 1
elif not "A" in child and "B" in child:
B += 1
elif "A" in child and "B" in child:
AB += 1
else:
O += 1
print(A*100//all, B*100//all, AB*100//all, O*100//all)