結果

問題 No.2209 Flip and Reverse
ユーザー deepjuggling
提出日時 2023-02-10 22:20:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 174,112 KB
最終ジャッジ日時 2024-07-07 16:31:56
合計ジャッジ時間 6,089 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input()
t = input()
s = list(s)
t = list(t)
ss = list(s)
ss.reverse()
mae = 0
usi = 0
for i in range(n):
    if s[i] != t[i]:
        mae += 1
    if ss[i] != t[i]:
        usi += 1
if mae <= usi and mae % 2 == 0:
    print(mae)
else:
    print(usi)
0