結果

問題 No.1183 コイン遊び
ユーザー takakintakakin
提出日時 2020-08-22 22:20:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 821 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 41,052 KB
最終ジャッジ日時 2024-04-23 12:26:49
合計ジャッジ時間 20,290 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 26 ms
10,752 KB
testcase_05 AC 27 ms
10,880 KB
testcase_06 AC 25 ms
10,880 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 27 ms
10,880 KB
testcase_10 AC 43 ms
11,136 KB
testcase_11 AC 77 ms
12,436 KB
testcase_12 AC 504 ms
28,928 KB
testcase_13 AC 447 ms
26,856 KB
testcase_14 AC 717 ms
34,352 KB
testcase_15 AC 781 ms
41,052 KB
testcase_16 AC 757 ms
35,944 KB
testcase_17 AC 774 ms
36,076 KB
testcase_18 AC 795 ms
36,148 KB
testcase_19 AC 802 ms
36,080 KB
testcase_20 AC 792 ms
36,080 KB
testcase_21 AC 733 ms
36,208 KB
testcase_22 AC 724 ms
36,864 KB
testcase_23 AC 751 ms
36,148 KB
testcase_24 AC 789 ms
36,080 KB
testcase_25 AC 780 ms
36,116 KB
testcase_26 AC 802 ms
36,148 KB
testcase_27 AC 790 ms
36,276 KB
testcase_28 AC 777 ms
36,380 KB
testcase_29 AC 736 ms
36,144 KB
testcase_30 AC 821 ms
35,952 KB
testcase_31 AC 787 ms
36,020 KB
testcase_32 AC 799 ms
35,956 KB
testcase_33 AC 793 ms
35,960 KB
testcase_34 AC 770 ms
39,964 KB
権限があれば一括ダウンロードができます

ソースコード

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