結果

問題 No.2209 Flip and Reverse
ユーザー first_vilfirst_vil
提出日時 2023-02-10 21:22:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 590 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 81,668 KB
最終ジャッジ日時 2023-09-21 22:22:40
合計ジャッジ時間 5,438 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,208 KB
testcase_01 AC 74 ms
71,276 KB
testcase_02 AC 72 ms
71,184 KB
testcase_03 AC 72 ms
71,008 KB
testcase_04 AC 70 ms
71,096 KB
testcase_05 AC 73 ms
71,412 KB
testcase_06 AC 72 ms
71,064 KB
testcase_07 AC 72 ms
71,060 KB
testcase_08 WA -
testcase_09 AC 73 ms
71,172 KB
testcase_10 AC 76 ms
71,248 KB
testcase_11 AC 75 ms
71,352 KB
testcase_12 AC 71 ms
71,124 KB
testcase_13 WA -
testcase_14 AC 124 ms
81,476 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 124 ms
81,536 KB
testcase_19 AC 123 ms
81,464 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 125 ms
81,440 KB
testcase_24 AC 120 ms
81,396 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 106 ms
81,476 KB
testcase_29 AC 106 ms
81,560 KB
testcase_30 AC 107 ms
81,376 KB
testcase_31 WA -
testcase_32 AC 104 ms
81,384 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

int1 = lambda x: int(x) - 1

# input = lambda: sys.stdin.buffer.readline()
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
i1 = lambda: int1(input())
mi = lambda: map(int, input().split())
mi1 = lambda: map(int1, input().split())
li = lambda: list(mi())
li1 = lambda: list(mi1())
lli = lambda n: [li() for _ in range(n)]

INF = float("inf")
# mod = int(1e9 + 7)
mod = 998244353

n = ii()
s = input()
t = input()

x = 0
y = 0
for i in range(n):
    x += s[i] != t[i]
    y += s[i] != t[-1 - i]

if x & 1:
    x += 1
if ~y & 1:
    y += 1
print(min(x, y))
0