結果

問題 No.2209 Flip and Reverse
コンテスト
ユーザー minimum
提出日時 2023-02-10 21:36:52
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 193 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 147 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 98,596 KB
最終ジャッジ日時 2026-03-29 07:06:13
合計ジャッジ時間 3,281 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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


cnt = sum([S[i] != T[i] for i in range(N)])
if cnt % 2 == 0:
    print(cnt)
    exit()

cnt = sum([S[i] != T[N - i - 1] for i in range(N)])
print(cnt)
0