結果

問題 No.2209 Flip and Reverse
ユーザー Yaowei LyuYaowei Lyu
提出日時 2023-02-10 21:27:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 101,512 KB
最終ジャッジ日時 2023-09-21 22:29:03
合計ジャッジ時間 5,535 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,184 KB
testcase_01 AC 70 ms
71,316 KB
testcase_02 AC 69 ms
71,452 KB
testcase_03 AC 70 ms
71,276 KB
testcase_04 AC 71 ms
71,004 KB
testcase_05 AC 72 ms
71,288 KB
testcase_06 AC 70 ms
71,244 KB
testcase_07 AC 70 ms
71,240 KB
testcase_08 AC 90 ms
85,488 KB
testcase_09 AC 70 ms
71,456 KB
testcase_10 AC 69 ms
71,188 KB
testcase_11 AC 70 ms
71,472 KB
testcase_12 AC 70 ms
71,012 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 98 ms
85,260 KB
testcase_19 AC 98 ms
85,284 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 98 ms
85,464 KB
testcase_24 AC 95 ms
85,180 KB
testcase_25 WA -
testcase_26 AC 95 ms
85,216 KB
testcase_27 AC 94 ms
85,248 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 91 ms
85,292 KB
testcase_31 WA -
testcase_32 AC 88 ms
85,188 KB
testcase_33 AC 87 ms
85,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline
n = int(input())
s = input()
t = input()
d = sum([s[i] != t[i] for i in range(n)])
if d % 2 == 0:
    print(d)
else:
    t = list(reversed(t))
    print(sum([s[i] != t[i] for i in range(n)]))
0