結果
| 問題 |
No.717 ファッションへのこだわり
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 11:46:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 294 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 82,024 KB |
| 実行使用メモリ | 64,524 KB |
| 最終ジャッジ日時 | 2024-12-20 21:50:49 |
| 合計ジャッジ時間 | 1,530 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
n,m=map(int,input().split())
s=list(map(lambda x:x,input()))
t=list(map(lambda x:x,input()))
p={'A':0,'B':0}
q={'A':0,'B':0}
for i in s:
p[i]=p[i]+1 if i in p.keys() else 1
for i in t:
q[i]=q[i]+1 if i in q.keys() else 1
ans=min(p['A'],q['A'])+min(p['B'],q['B'])
# print(p,q)
print(ans)