結果

問題 No.2209 Flip and Reverse
ユーザー sotanishysotanishy
提出日時 2023-02-10 21:30:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 81,828 KB
最終ジャッジ日時 2023-09-21 22:34:27
合計ジャッジ時間 6,142 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,432 KB
testcase_01 AC 77 ms
71,036 KB
testcase_02 AC 78 ms
71,284 KB
testcase_03 AC 77 ms
71,284 KB
testcase_04 AC 75 ms
71,116 KB
testcase_05 AC 77 ms
71,248 KB
testcase_06 AC 76 ms
71,252 KB
testcase_07 AC 75 ms
71,408 KB
testcase_08 AC 120 ms
81,264 KB
testcase_09 AC 77 ms
71,216 KB
testcase_10 AC 77 ms
71,132 KB
testcase_11 AC 75 ms
71,116 KB
testcase_12 AC 77 ms
71,104 KB
testcase_13 AC 77 ms
71,016 KB
testcase_14 AC 156 ms
81,640 KB
testcase_15 AC 156 ms
81,584 KB
testcase_16 AC 155 ms
81,804 KB
testcase_17 AC 155 ms
81,768 KB
testcase_18 AC 153 ms
81,744 KB
testcase_19 AC 155 ms
81,288 KB
testcase_20 AC 154 ms
81,744 KB
testcase_21 AC 155 ms
81,764 KB
testcase_22 AC 155 ms
81,724 KB
testcase_23 AC 158 ms
81,700 KB
testcase_24 AC 148 ms
81,776 KB
testcase_25 AC 153 ms
81,280 KB
testcase_26 AC 147 ms
81,560 KB
testcase_27 AC 146 ms
81,404 KB
testcase_28 AC 128 ms
81,584 KB
testcase_29 AC 126 ms
81,828 KB
testcase_30 AC 126 ms
81,456 KB
testcase_31 AC 126 ms
81,684 KB
testcase_32 AC 117 ms
81,168 KB
testcase_33 AC 120 ms
81,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
S = input().rstrip()
T = input().rstrip()
even = sum(S[i] != T[i] for i in range(N))
odd = sum(S[N-1-i] != T[i] for i in range(N))
ans = 10**18
if even % 2 == 0:
    ans = even
if odd % 2 == 1:
    ans = min(ans, odd)
print(ans)
0