結果

問題 No.1183 コイン遊び
ユーザー lam6er
提出日時 2025-03-20 18:49:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 362 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 276,308 KB
最終ジャッジ日時 2025-03-20 18:51:00
合計ジャッジ時間 9,997 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

count = 0
prev = 0
for ai, bi in zip(a, b):
    c = ai ^ bi
    if c == 1 and prev == 0:
        count += 1
    prev = c
print(count)
0