結果

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

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]
ans=0
st=0
for i in range(n):
	if A[i]==B[i] and st==1:
		ans+=1
		st=0
	elif A[i]!=B[i] and st==0:
		st=1
if st==1:
	ans+=1
print(ans)
0