結果

問題 No.2209 Flip and Reverse
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-02-10 21:35:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 337 bytes
コンパイル時間 580 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 191,768 KB
最終ジャッジ日時 2023-09-21 22:39:02
合計ジャッジ時間 9,960 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
72,708 KB
testcase_01 AC 107 ms
72,988 KB
testcase_02 AC 105 ms
72,776 KB
testcase_03 AC 105 ms
72,716 KB
testcase_04 AC 105 ms
72,648 KB
testcase_05 AC 103 ms
72,952 KB
testcase_06 AC 104 ms
72,900 KB
testcase_07 AC 105 ms
72,820 KB
testcase_08 WA -
testcase_09 AC 105 ms
72,828 KB
testcase_10 AC 106 ms
72,832 KB
testcase_11 AC 107 ms
72,896 KB
testcase_12 AC 106 ms
72,968 KB
testcase_13 WA -
testcase_14 AC 308 ms
191,264 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 306 ms
191,344 KB
testcase_19 AC 306 ms
191,404 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 304 ms
191,572 KB
testcase_24 AC 290 ms
191,348 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 278 ms
191,460 KB
testcase_29 AC 274 ms
191,336 KB
testcase_30 AC 274 ms
191,432 KB
testcase_31 WA -
testcase_32 AC 262 ms
191,444 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
S = list(input())[:-1]
T = list(input())[:-1]
X = sum(S[i]!=T[i] for i in range(N))
if X%2:
    X += 2
Y = sum(S[N-1-i]!=T[i] for i in range(N))
if Y%2==0:
    Y += 2
print(min(X,Y))
0