結果

問題 No.2209 Flip and Reverse
ユーザー ikomaikoma
提出日時 2023-02-10 21:57:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 229 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 138,624 KB
最終ジャッジ日時 2023-09-21 23:11:20
合計ジャッジ時間 7,557 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,300 KB
testcase_01 AC 74 ms
71,424 KB
testcase_02 AC 73 ms
71,488 KB
testcase_03 AC 73 ms
71,248 KB
testcase_04 AC 73 ms
71,420 KB
testcase_05 AC 71 ms
71,240 KB
testcase_06 AC 71 ms
71,472 KB
testcase_07 AC 71 ms
71,480 KB
testcase_08 AC 196 ms
138,548 KB
testcase_09 AC 71 ms
71,404 KB
testcase_10 AC 70 ms
71,536 KB
testcase_11 AC 70 ms
71,380 KB
testcase_12 AC 70 ms
71,308 KB
testcase_13 AC 70 ms
71,260 KB
testcase_14 AC 226 ms
138,248 KB
testcase_15 AC 224 ms
138,428 KB
testcase_16 AC 222 ms
138,176 KB
testcase_17 AC 221 ms
138,400 KB
testcase_18 AC 227 ms
138,460 KB
testcase_19 AC 228 ms
138,484 KB
testcase_20 AC 229 ms
138,352 KB
testcase_21 AC 227 ms
138,520 KB
testcase_22 AC 227 ms
138,616 KB
testcase_23 AC 227 ms
138,224 KB
testcase_24 AC 216 ms
138,392 KB
testcase_25 AC 216 ms
138,236 KB
testcase_26 AC 218 ms
138,160 KB
testcase_27 AC 219 ms
138,240 KB
testcase_28 AC 201 ms
138,560 KB
testcase_29 AC 197 ms
138,168 KB
testcase_30 AC 198 ms
138,412 KB
testcase_31 AC 196 ms
138,400 KB
testcase_32 AC 194 ms
138,624 KB
testcase_33 AC 196 ms
138,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
S=list(map(int,input().strip()))
T=list(map(int,input().strip()))
INF=10**9
ans=INF
x=0
for s,t in zip(S,T):
    if s!=t:x+=1
if x%2==0:
    ans = x
x=0
for s,t in zip(S[::-1],T):
    if s!=t:x+=1
if x%2==1:
    ans = min(ans, x)
print(ans)
0