結果

問題 No.2209 Flip and Reverse
コンテスト
ユーザー deepjuggling
提出日時 2023-02-10 22:20:54
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 270 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 155 ms
コンパイル使用メモリ 85,832 KB
実行使用メモリ 165,064 KB
最終ジャッジ日時 2026-03-29 07:40:33
合計ジャッジ時間 3,880 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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