結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
73,060 KB
testcase_01 AC 102 ms
72,900 KB
testcase_02 AC 103 ms
73,208 KB
testcase_03 AC 111 ms
72,936 KB
testcase_04 AC 105 ms
72,940 KB
testcase_05 AC 104 ms
72,912 KB
testcase_06 AC 105 ms
72,976 KB
testcase_07 AC 104 ms
72,756 KB
testcase_08 WA -
testcase_09 AC 104 ms
73,236 KB
testcase_10 AC 104 ms
72,920 KB
testcase_11 AC 103 ms
73,032 KB
testcase_12 AC 103 ms
73,004 KB
testcase_13 WA -
testcase_14 AC 288 ms
191,624 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 289 ms
191,572 KB
testcase_19 AC 287 ms
191,568 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 289 ms
191,652 KB
testcase_24 AC 280 ms
191,608 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 256 ms
191,476 KB
testcase_29 AC 254 ms
191,624 KB
testcase_30 AC 253 ms
191,720 KB
testcase_31 WA -
testcase_32 AC 247 ms
191,568 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 += 1
    
    

print(min(X,Y))
0