結果

問題 No.2209 Flip and Reverse
ユーザー rlangevinrlangevin
提出日時 2023-02-10 21:34:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 86,796 KB
実行使用メモリ 173,776 KB
最終ジャッジ日時 2023-09-21 22:37:45
合計ジャッジ時間 7,824 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,172 KB
testcase_01 AC 79 ms
71,304 KB
testcase_02 AC 76 ms
71,380 KB
testcase_03 AC 77 ms
71,392 KB
testcase_04 AC 77 ms
71,404 KB
testcase_05 AC 79 ms
71,112 KB
testcase_06 AC 78 ms
71,252 KB
testcase_07 AC 80 ms
71,120 KB
testcase_08 AC 209 ms
173,080 KB
testcase_09 AC 77 ms
71,208 KB
testcase_10 AC 77 ms
71,336 KB
testcase_11 AC 78 ms
71,076 KB
testcase_12 AC 79 ms
71,164 KB
testcase_13 WA -
testcase_14 AC 232 ms
173,504 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 229 ms
173,404 KB
testcase_19 AC 228 ms
173,400 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 228 ms
173,488 KB
testcase_24 AC 220 ms
173,476 KB
testcase_25 WA -
testcase_26 AC 225 ms
173,288 KB
testcase_27 AC 227 ms
173,248 KB
testcase_28 AC 207 ms
173,360 KB
testcase_29 AC 206 ms
173,284 KB
testcase_30 AC 207 ms
173,348 KB
testcase_31 WA -
testcase_32 AC 201 ms
173,136 KB
testcase_33 AC 202 ms
173,452 KB
権限があれば一括ダウンロードができます

ソースコード

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