結果

問題 No.717 ファッションへのこだわり
ユーザー brthyyjp
提出日時 2020-05-25 09:45:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 615 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 59,520 KB
最終ジャッジ日時 2024-10-13 02:01:12
合計ジャッジ時間 1,938 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
s = str(input())
t = str(input())
x = 0
y = 0
for i in range(n):
    if s[i] == 'A':
        x += 1
    else:
        y += 1

z = 0
w = 0
for i in range(m):
    if t[i] == 'A':
        z += 1
    else:
        w += 1

ans = min(x, z)+min(y, w)
print(ans)
0