結果

問題 No.2209 Flip and Reverse
ユーザー ああいいああいい
提出日時 2023-02-10 21:53:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 83,344 KB
最終ジャッジ日時 2023-09-21 23:04:13
合計ジャッジ時間 5,511 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,208 KB
testcase_01 AC 68 ms
71,272 KB
testcase_02 AC 67 ms
71,416 KB
testcase_03 AC 67 ms
71,184 KB
testcase_04 AC 68 ms
71,132 KB
testcase_05 AC 68 ms
71,232 KB
testcase_06 AC 69 ms
71,352 KB
testcase_07 AC 71 ms
71,364 KB
testcase_08 AC 108 ms
83,060 KB
testcase_09 AC 69 ms
71,428 KB
testcase_10 AC 68 ms
71,296 KB
testcase_11 AC 69 ms
71,300 KB
testcase_12 AC 68 ms
71,240 KB
testcase_13 AC 69 ms
71,396 KB
testcase_14 AC 123 ms
83,140 KB
testcase_15 AC 123 ms
83,184 KB
testcase_16 AC 123 ms
83,184 KB
testcase_17 AC 123 ms
83,044 KB
testcase_18 AC 123 ms
83,188 KB
testcase_19 AC 125 ms
83,336 KB
testcase_20 AC 125 ms
83,344 KB
testcase_21 AC 124 ms
83,236 KB
testcase_22 AC 126 ms
83,164 KB
testcase_23 AC 125 ms
83,128 KB
testcase_24 AC 119 ms
83,104 KB
testcase_25 AC 119 ms
83,160 KB
testcase_26 AC 118 ms
83,260 KB
testcase_27 AC 119 ms
83,284 KB
testcase_28 AC 109 ms
83,164 KB
testcase_29 AC 109 ms
83,264 KB
testcase_30 AC 109 ms
83,128 KB
testcase_31 AC 109 ms
83,120 KB
testcase_32 AC 114 ms
83,256 KB
testcase_33 AC 106 ms
83,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()
T = input()

ans = 10 ** 6
SS = S[::-1]

tmp = 0
for i in range(N):
    if S[i] != T[i]:
        tmp += 1
if tmp % 2 == 0:
    ans = tmp
tmp = 0
for i in range(N):
    if SS[i] != T[i]:
        tmp += 1
if tmp % 2 == 1 and tmp < ans:
    ans = tmp
print(ans)
0