結果

問題 No.2209 Flip and Reverse
ユーザー ShirotsumeShirotsume
提出日時 2022-12-27 00:58:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 81,280 KB
最終ジャッジ日時 2024-05-01 17:42:44
合計ジャッジ時間 4,997 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,632 KB
testcase_01 AC 44 ms
53,760 KB
testcase_02 AC 43 ms
54,016 KB
testcase_03 AC 41 ms
53,760 KB
testcase_04 AC 41 ms
53,248 KB
testcase_05 AC 40 ms
53,760 KB
testcase_06 AC 39 ms
53,504 KB
testcase_07 AC 40 ms
53,888 KB
testcase_08 WA -
testcase_09 AC 39 ms
53,632 KB
testcase_10 AC 40 ms
53,760 KB
testcase_11 AC 40 ms
53,760 KB
testcase_12 AC 40 ms
53,504 KB
testcase_13 WA -
testcase_14 AC 91 ms
81,216 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 89 ms
80,996 KB
testcase_19 AC 92 ms
81,028 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 91 ms
80,640 KB
testcase_24 AC 86 ms
80,932 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 78 ms
80,596 KB
testcase_29 AC 78 ms
80,828 KB
testcase_30 AC 76 ms
80,896 KB
testcase_31 WA -
testcase_32 AC 73 ms
80,640 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, Counter
sys.setrecursionlimit(5 * 10 ** 5)
from pypyjit import set_param
set_param('max_unroll_recursion=-1')
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
n = ii()
s = input()
t = input()

cnt = 0
for i in range(n):
    if s[i] != t[i]:
        cnt += 1

cnt2 = 0
for i in range(n):
    if s[n - i - 1] != t[i]:
        cnt2 += 1
print(min(cnt, cnt2))
0