結果

問題 No.1183 コイン遊び
ユーザー anagohirameanagohirame
提出日時 2020-08-22 13:27:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 418 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 276,164 KB
最終ジャッジ日時 2024-04-23 07:54:50
合計ジャッジ時間 11,551 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 42 ms
51,840 KB
testcase_02 AC 40 ms
51,712 KB
testcase_03 AC 40 ms
51,456 KB
testcase_04 AC 40 ms
51,968 KB
testcase_05 AC 41 ms
51,840 KB
testcase_06 AC 41 ms
51,712 KB
testcase_07 AC 40 ms
51,712 KB
testcase_08 AC 45 ms
58,112 KB
testcase_09 AC 48 ms
58,112 KB
testcase_10 AC 57 ms
67,200 KB
testcase_11 AC 75 ms
83,584 KB
testcase_12 AC 279 ms
197,800 KB
testcase_13 AC 247 ms
190,200 KB
testcase_14 AC 392 ms
244,768 KB
testcase_15 AC 411 ms
275,744 KB
testcase_16 AC 410 ms
275,772 KB
testcase_17 AC 413 ms
275,904 KB
testcase_18 AC 411 ms
275,392 KB
testcase_19 AC 412 ms
275,392 KB
testcase_20 AC 413 ms
275,988 KB
testcase_21 AC 398 ms
275,656 KB
testcase_22 AC 392 ms
275,648 KB
testcase_23 AC 392 ms
275,652 KB
testcase_24 AC 393 ms
275,528 KB
testcase_25 AC 411 ms
275,856 KB
testcase_26 AC 408 ms
275,552 KB
testcase_27 AC 414 ms
275,392 KB
testcase_28 AC 413 ms
276,036 KB
testcase_29 AC 394 ms
276,036 KB
testcase_30 AC 400 ms
275,908 KB
testcase_31 AC 411 ms
275,652 KB
testcase_32 AC 418 ms
276,032 KB
testcase_33 AC 417 ms
276,164 KB
testcase_34 AC 411 ms
275,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
tmp = 0
for a, b in zip(A, B):
	if a != b:
		tmp += 1
	else:
		if tmp > 0:
			ans += 1
			tmp = 0
if tmp > 0:
	ans += 1
print(ans)
0