結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
72,980 KB
testcase_01 AC 103 ms
72,972 KB
testcase_02 AC 103 ms
72,692 KB
testcase_03 AC 104 ms
72,724 KB
testcase_04 AC 104 ms
72,956 KB
testcase_05 AC 104 ms
72,952 KB
testcase_06 AC 105 ms
72,968 KB
testcase_07 AC 104 ms
72,812 KB
testcase_08 WA -
testcase_09 AC 103 ms
72,756 KB
testcase_10 AC 103 ms
72,744 KB
testcase_11 AC 103 ms
72,812 KB
testcase_12 AC 103 ms
72,796 KB
testcase_13 WA -
testcase_14 AC 295 ms
191,224 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 295 ms
191,216 KB
testcase_19 AC 295 ms
191,356 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 292 ms
191,436 KB
testcase_24 AC 281 ms
191,400 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 258 ms
191,392 KB
testcase_29 AC 258 ms
191,260 KB
testcase_30 AC 260 ms
191,280 KB
testcase_31 WA -
testcase_32 AC 252 ms
191,348 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 += 1
Y = sum(S[N-1-i]!=T[i] for i in range(N))
if Y%2==0:
    Y += 1
print(min(X,Y))
0