結果

問題 No.1183 コイン遊び
ユーザー gorugo30gorugo30
提出日時 2021-02-25 17:17:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 366 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 275,596 KB
最終ジャッジ日時 2024-04-08 15:05:58
合計ジャッジ時間 12,465 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 54 ms
53,460 KB
testcase_04 AC 38 ms
53,460 KB
testcase_05 AC 35 ms
53,460 KB
testcase_06 AC 36 ms
53,460 KB
testcase_07 AC 35 ms
53,460 KB
testcase_08 AC 39 ms
59,460 KB
testcase_09 AC 39 ms
59,460 KB
testcase_10 AC 47 ms
69,712 KB
testcase_11 AC 64 ms
84,492 KB
testcase_12 AC 267 ms
202,468 KB
testcase_13 AC 237 ms
190,024 KB
testcase_14 AC 327 ms
252,024 KB
testcase_15 AC 366 ms
275,580 KB
testcase_16 AC 345 ms
275,596 KB
testcase_17 AC 351 ms
275,552 KB
testcase_18 AC 344 ms
275,552 KB
testcase_19 AC 347 ms
275,552 KB
testcase_20 AC 339 ms
275,556 KB
testcase_21 AC 333 ms
275,528 KB
testcase_22 AC 339 ms
275,556 KB
testcase_23 AC 342 ms
275,528 KB
testcase_24 AC 334 ms
275,528 KB
testcase_25 AC 347 ms
275,528 KB
testcase_26 AC 349 ms
275,552 KB
testcase_27 AC 344 ms
275,528 KB
testcase_28 AC 345 ms
275,556 KB
testcase_29 AC 337 ms
275,552 KB
testcase_30 AC 338 ms
275,556 KB
testcase_31 AC 350 ms
275,552 KB
testcase_32 AC 345 ms
275,528 KB
testcase_33 AC 347 ms
275,596 KB
testcase_34 AC 348 ms
275,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = [A[i] ^ B[i] for i in range(N)]
ans = 0
for i in range(1, N):
    if C[i - 1] == 1 and C[i] == 0:
        ans += 1
if C[-1] == 1:
    ans += 1
print(ans)
0