結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
73,024 KB
testcase_01 AC 109 ms
72,532 KB
testcase_02 AC 112 ms
72,852 KB
testcase_03 AC 109 ms
72,924 KB
testcase_04 AC 110 ms
72,948 KB
testcase_05 AC 107 ms
72,888 KB
testcase_06 AC 107 ms
72,920 KB
testcase_07 AC 109 ms
72,716 KB
testcase_08 WA -
testcase_09 AC 107 ms
72,984 KB
testcase_10 AC 108 ms
72,516 KB
testcase_11 AC 107 ms
72,980 KB
testcase_12 AC 108 ms
72,620 KB
testcase_13 AC 113 ms
72,620 KB
testcase_14 AC 301 ms
191,380 KB
testcase_15 AC 303 ms
191,216 KB
testcase_16 AC 306 ms
191,356 KB
testcase_17 AC 300 ms
191,564 KB
testcase_18 AC 300 ms
191,332 KB
testcase_19 AC 301 ms
191,520 KB
testcase_20 AC 298 ms
191,320 KB
testcase_21 AC 296 ms
191,332 KB
testcase_22 AC 298 ms
191,288 KB
testcase_23 AC 295 ms
191,260 KB
testcase_24 AC 290 ms
191,472 KB
testcase_25 AC 288 ms
191,368 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 272 ms
191,348 KB
testcase_29 AC 267 ms
191,204 KB
testcase_30 AC 264 ms
191,192 KB
testcase_31 AC 271 ms
191,196 KB
testcase_32 AC 257 ms
191,132 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<<60)
Y = sum(S[N-1-i]!=T[i] for i in range(N))
if Y%2==0:
    Y += 1
    
    

print(min(X,Y))
0