結果

問題 No.2209 Flip and Reverse
ユーザー nautnaut
提出日時 2023-09-16 20:31:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 238 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 31,660 KB
最終ジャッジ日時 2023-09-16 20:31:33
合計ジャッジ時間 7,730 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,748 KB
testcase_01 AC 16 ms
7,800 KB
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 16 ms
7,780 KB
testcase_04 AC 15 ms
7,796 KB
testcase_05 AC 16 ms
7,828 KB
testcase_06 AC 15 ms
7,748 KB
testcase_07 AC 15 ms
7,840 KB
testcase_08 AC 218 ms
31,604 KB
testcase_09 AC 15 ms
7,884 KB
testcase_10 AC 15 ms
7,764 KB
testcase_11 AC 15 ms
7,788 KB
testcase_12 AC 15 ms
7,852 KB
testcase_13 AC 15 ms
7,840 KB
testcase_14 AC 231 ms
31,604 KB
testcase_15 AC 234 ms
31,500 KB
testcase_16 AC 230 ms
31,656 KB
testcase_17 AC 230 ms
31,648 KB
testcase_18 AC 233 ms
31,568 KB
testcase_19 AC 231 ms
31,616 KB
testcase_20 AC 238 ms
31,496 KB
testcase_21 AC 231 ms
31,560 KB
testcase_22 AC 233 ms
31,484 KB
testcase_23 AC 232 ms
31,556 KB
testcase_24 AC 229 ms
31,656 KB
testcase_25 AC 231 ms
31,608 KB
testcase_26 AC 227 ms
31,520 KB
testcase_27 AC 228 ms
31,568 KB
testcase_28 AC 218 ms
31,640 KB
testcase_29 AC 220 ms
31,648 KB
testcase_30 AC 223 ms
31,604 KB
testcase_31 AC 220 ms
31,568 KB
testcase_32 AC 221 ms
31,660 KB
testcase_33 AC 220 ms
31,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())
T = list(input())

S_rev = S[::-1]

c1 = sum(S[i] != T[i] for i in range(N))
c2 = sum(S_rev[i] != T[i] for i in range(N))

if c1 % 2 == 0:
    print(c1)
else:
    print(c2)
0