結果

問題 No.2209 Flip and Reverse
ユーザー ああいいああいい
提出日時 2023-02-10 21:51:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 83,444 KB
最終ジャッジ日時 2023-09-21 23:00:17
合計ジャッジ時間 6,799 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,480 KB
testcase_01 AC 72 ms
71,240 KB
testcase_02 AC 73 ms
71,576 KB
testcase_03 AC 72 ms
71,360 KB
testcase_04 AC 74 ms
71,356 KB
testcase_05 AC 73 ms
71,108 KB
testcase_06 AC 73 ms
71,416 KB
testcase_07 AC 73 ms
71,324 KB
testcase_08 WA -
testcase_09 AC 74 ms
71,192 KB
testcase_10 AC 71 ms
71,304 KB
testcase_11 WA -
testcase_12 AC 71 ms
71,460 KB
testcase_13 AC 71 ms
71,392 KB
testcase_14 AC 127 ms
83,236 KB
testcase_15 AC 128 ms
83,208 KB
testcase_16 AC 130 ms
83,228 KB
testcase_17 AC 128 ms
83,192 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 134 ms
83,396 KB
testcase_21 AC 131 ms
83,256 KB
testcase_22 AC 131 ms
83,272 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 124 ms
83,336 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 114 ms
83,340 KB
testcase_29 AC 116 ms
83,216 KB
testcase_30 WA -
testcase_31 AC 114 ms
83,164 KB
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 10 ** 6
SS = S[::-1]

tmp = 0
for i in range(N):
    if S[i] != T[i]:
        tmp += 1
if tmp % 2 == 0:
    ans = tmp
tmp = 0
for i in range(N):
    if SS[i] != T[i]:
        tmp += 1
if tmp % 2 == 1 and tmp < ans:
    ans = tmp
print(tmp)
0