結果

問題 No.1183 コイン遊び
ユーザー 双六双六
提出日時 2020-08-26 05:27:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 417 ms / 2,000 ms
コード長 470 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 82,272 KB
実行使用メモリ 267,344 KB
最終ジャッジ日時 2024-04-24 09:31:28
合計ジャッジ時間 11,108 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,632 KB
testcase_01 AC 42 ms
54,144 KB
testcase_02 AC 42 ms
54,144 KB
testcase_03 AC 42 ms
53,632 KB
testcase_04 AC 43 ms
53,888 KB
testcase_05 AC 41 ms
53,888 KB
testcase_06 AC 42 ms
53,632 KB
testcase_07 AC 42 ms
53,632 KB
testcase_08 AC 45 ms
59,904 KB
testcase_09 AC 46 ms
60,160 KB
testcase_10 AC 52 ms
67,968 KB
testcase_11 AC 65 ms
83,968 KB
testcase_12 AC 230 ms
203,220 KB
testcase_13 AC 213 ms
196,068 KB
testcase_14 AC 315 ms
236,012 KB
testcase_15 AC 417 ms
267,004 KB
testcase_16 AC 331 ms
258,964 KB
testcase_17 AC 340 ms
267,344 KB
testcase_18 AC 341 ms
267,032 KB
testcase_19 AC 344 ms
267,024 KB
testcase_20 AC 342 ms
266,812 KB
testcase_21 AC 314 ms
258,676 KB
testcase_22 AC 318 ms
258,800 KB
testcase_23 AC 316 ms
258,844 KB
testcase_24 AC 318 ms
258,708 KB
testcase_25 AC 340 ms
267,288 KB
testcase_26 AC 339 ms
267,020 KB
testcase_27 AC 338 ms
267,184 KB
testcase_28 AC 350 ms
267,028 KB
testcase_29 AC 317 ms
258,584 KB
testcase_30 AC 337 ms
267,124 KB
testcase_31 AC 340 ms
267,004 KB
testcase_32 AC 347 ms
267,128 KB
testcase_33 AC 349 ms
267,148 KB
testcase_34 AC 331 ms
258,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	B = getlist()
	cnt = 0
	val = 0
	for i in range(N):
		if A[i] != B[i]:
			val = 1
		else:
			if val == 1:
				cnt += 1
			val = 0

	if val == 1:
		cnt += 1

	print(cnt)

if __name__ == '__main__':
	main()
0