結果

問題 No.2209 Flip and Reverse
ユーザー ニックネームニックネーム
提出日時 2023-02-10 21:27:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 254 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 1,057 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 11,080 KB
最終ジャッジ日時 2023-09-21 22:29:42
合計ジャッジ時間 6,991 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 16 ms
7,820 KB
testcase_03 AC 16 ms
7,952 KB
testcase_04 AC 16 ms
7,760 KB
testcase_05 AC 16 ms
7,764 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 AC 16 ms
7,760 KB
testcase_08 AC 218 ms
11,004 KB
testcase_09 AC 16 ms
7,768 KB
testcase_10 AC 16 ms
7,692 KB
testcase_11 AC 16 ms
7,740 KB
testcase_12 AC 16 ms
7,752 KB
testcase_13 AC 15 ms
7,740 KB
testcase_14 AC 237 ms
10,808 KB
testcase_15 AC 254 ms
10,880 KB
testcase_16 AC 244 ms
10,864 KB
testcase_17 AC 239 ms
10,956 KB
testcase_18 AC 242 ms
11,080 KB
testcase_19 AC 241 ms
11,008 KB
testcase_20 AC 245 ms
10,892 KB
testcase_21 AC 239 ms
10,916 KB
testcase_22 AC 246 ms
10,880 KB
testcase_23 AC 241 ms
10,980 KB
testcase_24 AC 245 ms
10,880 KB
testcase_25 AC 238 ms
10,996 KB
testcase_26 AC 246 ms
11,040 KB
testcase_27 AC 227 ms
10,916 KB
testcase_28 AC 205 ms
10,884 KB
testcase_29 AC 207 ms
10,892 KB
testcase_30 AC 210 ms
10,880 KB
testcase_31 AC 212 ms
10,884 KB
testcase_32 AC 187 ms
10,996 KB
testcase_33 AC 210 ms
10,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input(); t = input()
if (s.count("0")-t.count("0"))%2: s = s[::-1]
ans = 0
for u,v in zip(s,t): ans += u!=v
print(ans)
0