結果

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

ソースコード

diff #

N=int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
diff = [A[i]!=B[i] for i in range(N)]

flip = 1 if diff[0] else 0
for idx in range(1,N):
  if diff[idx-1] != diff[idx] and diff[idx]:
    flip += 1
print(flip)

0