結果

問題 No.1183 コイン遊び
ユーザー match1997
提出日時 2020-10-07 08:22:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 914 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 39,976 KB
最終ジャッジ日時 2024-07-20 03:14:40
合計ジャッジ時間 22,006 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
*A, = map(int,(input().split()))
*B, = map(int,(input().split()))
if A[0] == B[0]:
    count=0
else:
    count=1
    
for i in range(N-1):
    if A[i]==B[i]:
        if A[i]==B[i] and A[i+1] != B[i+1]:
            count +=1
    else:
        if A[i] != B[i] and A[i+1] == B[i+1]:
            count +=0
print(count)  
0