結果

問題 No.2209 Flip and Reverse
ユーザー rlangevinrlangevin
提出日時 2023-02-10 21:24:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 86,768 KB
実行使用メモリ 174,196 KB
最終ジャッジ日時 2023-09-21 22:25:25
合計ジャッジ時間 7,541 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,052 KB
testcase_01 AC 72 ms
71,044 KB
testcase_02 AC 72 ms
71,056 KB
testcase_03 AC 71 ms
71,200 KB
testcase_04 AC 74 ms
71,260 KB
testcase_05 AC 73 ms
71,268 KB
testcase_06 AC 73 ms
71,044 KB
testcase_07 AC 72 ms
70,856 KB
testcase_08 WA -
testcase_09 AC 74 ms
71,400 KB
testcase_10 AC 71 ms
71,248 KB
testcase_11 AC 72 ms
71,296 KB
testcase_12 AC 72 ms
71,264 KB
testcase_13 WA -
testcase_14 AC 225 ms
173,392 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 226 ms
173,032 KB
testcase_19 AC 227 ms
173,296 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 229 ms
173,360 KB
testcase_24 AC 218 ms
173,376 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 202 ms
173,228 KB
testcase_29 AC 203 ms
173,188 KB
testcase_30 AC 201 ms
173,408 KB
testcase_31 WA -
testcase_32 AC 197 ms
173,212 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

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 cnt1 % 2:
    cnt1 += 1
if cnt2 % 2 == 0:
    cnt2 += 1
print( min(cnt1, cnt2) )
0