結果

問題 No.2209 Flip and Reverse
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-02-10 22:05:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 81,360 KB
最終ジャッジ日時 2023-09-21 23:21:58
合計ジャッジ時間 6,231 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,248 KB
testcase_01 AC 70 ms
71,300 KB
testcase_02 AC 71 ms
71,436 KB
testcase_03 AC 70 ms
71,388 KB
testcase_04 AC 71 ms
71,560 KB
testcase_05 AC 71 ms
71,404 KB
testcase_06 AC 74 ms
71,284 KB
testcase_07 AC 71 ms
71,408 KB
testcase_08 AC 131 ms
81,184 KB
testcase_09 AC 71 ms
71,332 KB
testcase_10 AC 71 ms
71,260 KB
testcase_11 AC 72 ms
71,388 KB
testcase_12 AC 71 ms
71,356 KB
testcase_13 AC 72 ms
71,524 KB
testcase_14 AC 143 ms
80,996 KB
testcase_15 AC 143 ms
81,288 KB
testcase_16 AC 143 ms
81,192 KB
testcase_17 AC 145 ms
81,292 KB
testcase_18 AC 144 ms
81,008 KB
testcase_19 AC 145 ms
81,236 KB
testcase_20 AC 143 ms
81,360 KB
testcase_21 AC 143 ms
81,196 KB
testcase_22 AC 145 ms
81,224 KB
testcase_23 AC 144 ms
81,224 KB
testcase_24 AC 138 ms
81,140 KB
testcase_25 AC 139 ms
81,228 KB
testcase_26 AC 137 ms
81,300 KB
testcase_27 AC 138 ms
81,252 KB
testcase_28 AC 130 ms
81,196 KB
testcase_29 AC 128 ms
81,164 KB
testcase_30 AC 130 ms
81,232 KB
testcase_31 AC 130 ms
81,288 KB
testcase_32 AC 129 ms
80,952 KB
testcase_33 AC 135 ms
80,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = input()
T = input()

def solve(S,T,mod):
    count = 0
    for s,t in zip(S,T):
        if s != t:
            count += 1
    if count%2 == mod:
        return count
    else:
        return 10**10

ans = min(solve(S,T,0),solve(S[::-1],T,1))
print(ans)
0