結果

問題 No.2209 Flip and Reverse
ユーザー chankei271828chankei271828
提出日時 2023-02-10 22:22:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 227 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 87,236 KB
実行使用メモリ 174,040 KB
最終ジャッジ日時 2023-09-21 23:37:58
合計ジャッジ時間 7,468 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,384 KB
testcase_01 AC 72 ms
71,556 KB
testcase_02 AC 69 ms
71,104 KB
testcase_03 AC 76 ms
71,296 KB
testcase_04 AC 71 ms
71,148 KB
testcase_05 AC 72 ms
71,628 KB
testcase_06 AC 71 ms
71,316 KB
testcase_07 AC 72 ms
71,488 KB
testcase_08 AC 201 ms
173,824 KB
testcase_09 AC 85 ms
71,456 KB
testcase_10 AC 71 ms
71,416 KB
testcase_11 AC 70 ms
71,616 KB
testcase_12 AC 70 ms
71,308 KB
testcase_13 AC 70 ms
71,556 KB
testcase_14 AC 218 ms
173,960 KB
testcase_15 AC 222 ms
173,684 KB
testcase_16 AC 223 ms
173,752 KB
testcase_17 AC 218 ms
173,832 KB
testcase_18 AC 220 ms
173,836 KB
testcase_19 AC 221 ms
173,852 KB
testcase_20 AC 221 ms
173,900 KB
testcase_21 AC 227 ms
173,976 KB
testcase_22 AC 221 ms
173,948 KB
testcase_23 AC 222 ms
173,976 KB
testcase_24 AC 220 ms
173,836 KB
testcase_25 AC 214 ms
173,820 KB
testcase_26 AC 210 ms
173,824 KB
testcase_27 AC 214 ms
173,696 KB
testcase_28 AC 200 ms
174,040 KB
testcase_29 AC 209 ms
173,976 KB
testcase_30 AC 200 ms
173,816 KB
testcase_31 AC 199 ms
173,844 KB
testcase_32 AC 200 ms
173,740 KB
testcase_33 AC 207 ms
173,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
S=list(input())
T=list(input())
#偶数回で
cnt1=0
for i in range(N):
    if S[i]!=T[i]:
        cnt1+=1
S=list(reversed(S))
cnt2=0
for i in range(N):
    if S[i]!=T[i]:
        cnt2+=1
if cnt1%2==0:
    print(cnt1)
else:
    print(cnt2)
0