結果

問題 No.717 ファッションへのこだわり
ユーザー brthyyjpbrthyyjp
提出日時 2020-05-25 09:45:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 59,008 KB
最終ジャッジ日時 2024-04-21 03:40:46
合計ジャッジ時間 1,515 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,712 KB
testcase_01 AC 40 ms
51,712 KB
testcase_02 AC 45 ms
52,224 KB
testcase_03 AC 40 ms
52,096 KB
testcase_04 AC 40 ms
51,584 KB
testcase_05 AC 40 ms
52,224 KB
testcase_06 AC 41 ms
51,840 KB
testcase_07 AC 48 ms
58,752 KB
testcase_08 AC 48 ms
59,008 KB
testcase_09 AC 45 ms
58,496 KB
testcase_10 AC 45 ms
58,240 KB
testcase_11 AC 48 ms
58,752 KB
testcase_12 AC 48 ms
58,496 KB
権限があれば一括ダウンロードができます

ソースコード

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