結果

問題 No.2209 Flip and Reverse
ユーザー rlangevinrlangevin
提出日時 2023-02-10 21:31:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 86,544 KB
実行使用メモリ 180,364 KB
最終ジャッジ日時 2023-09-21 22:34:51
合計ジャッジ時間 7,954 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,152 KB
testcase_01 AC 76 ms
71,184 KB
testcase_02 AC 73 ms
71,120 KB
testcase_03 AC 71 ms
71,048 KB
testcase_04 AC 72 ms
71,116 KB
testcase_05 AC 75 ms
71,072 KB
testcase_06 AC 73 ms
70,932 KB
testcase_07 AC 76 ms
71,240 KB
testcase_08 WA -
testcase_09 AC 78 ms
70,912 KB
testcase_10 AC 77 ms
71,044 KB
testcase_11 AC 76 ms
71,288 KB
testcase_12 AC 73 ms
71,128 KB
testcase_13 WA -
testcase_14 AC 225 ms
173,320 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 226 ms
173,392 KB
testcase_19 AC 221 ms
173,276 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 227 ms
173,560 KB
testcase_24 AC 224 ms
173,216 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 208 ms
173,372 KB
testcase_29 AC 202 ms
173,260 KB
testcase_30 AC 205 ms
173,256 KB
testcase_31 WA -
testcase_32 AC 203 ms
173,072 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())
T = list(input())
Sr = S[::-1]
cnt1, cnt2 = 0, 0
for i in range(N):
    if S[i] != T[i]:
        cnt1 += 1
    if Sr[i] != T[i]:
        cnt2 += 1
if Sr == T:
    cnt2 = 2

print( min(cnt1, cnt2) )
0