結果

問題 No.1183 コイン遊び
ユーザー O2MTO2MT
提出日時 2020-08-22 15:46:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 776 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 39,976 KB
最終ジャッジ日時 2024-04-23 10:02:41
合計ジャッジ時間 19,873 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 31 ms
10,752 KB
testcase_04 AC 31 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 30 ms
10,752 KB
testcase_08 AC 33 ms
10,752 KB
testcase_09 AC 31 ms
10,752 KB
testcase_10 AC 45 ms
11,264 KB
testcase_11 AC 73 ms
12,484 KB
testcase_12 AC 485 ms
28,992 KB
testcase_13 AC 451 ms
26,940 KB
testcase_14 AC 731 ms
34,620 KB
testcase_15 AC 756 ms
39,976 KB
testcase_16 AC 751 ms
36,152 KB
testcase_17 AC 755 ms
36,152 KB
testcase_18 AC 760 ms
36,152 KB
testcase_19 AC 749 ms
36,152 KB
testcase_20 AC 746 ms
36,008 KB
testcase_21 AC 731 ms
36,076 KB
testcase_22 AC 725 ms
36,144 KB
testcase_23 AC 688 ms
36,152 KB
testcase_24 AC 774 ms
36,284 KB
testcase_25 AC 763 ms
36,280 KB
testcase_26 AC 749 ms
36,156 KB
testcase_27 AC 776 ms
36,156 KB
testcase_28 AC 747 ms
36,012 KB
testcase_29 AC 759 ms
36,072 KB
testcase_30 AC 758 ms
36,152 KB
testcase_31 AC 749 ms
36,152 KB
testcase_32 AC 774 ms
35,944 KB
testcase_33 AC 761 ms
36,128 KB
testcase_34 AC 748 ms
39,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

ans = 0
flg = 0
for i in range(N):
  if A[i] != B[i]:
    flg = 1
  if A[i] == B[i]:
    ans += flg
    flg = 0
if A[-1] != B[-1]:
  ans += 1
print(ans)
0