結果

問題 No.2209 Flip and Reverse
ユーザー rlangevin
提出日時 2023-02-10 21:34:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 174,760 KB
最終ジャッジ日時 2024-07-07 15:44:47
合計ジャッジ時間 6,178 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())
T = list(input())
Sr = S[::-1]
cnt1, cnt2 = 0, 0
for i in range(N):
    if S[i] != T[i]:
        cnt1 += 1
    if Sr[i] != T[i]:
        cnt2 += 1
if cnt2 % 2:
    ans = min(cnt1, cnt2)
else:
    ans = cnt1

print(ans)
0