結果

問題 No.1183 コイン遊び
ユーザー roarisroaris
提出日時 2020-08-22 16:18:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 434 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 275,756 KB
最終ジャッジ日時 2024-04-23 10:29:46
合計ジャッジ時間 12,232 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,840 KB
testcase_01 AC 39 ms
51,968 KB
testcase_02 AC 41 ms
51,712 KB
testcase_03 AC 40 ms
51,968 KB
testcase_04 AC 40 ms
51,840 KB
testcase_05 AC 40 ms
51,840 KB
testcase_06 AC 40 ms
52,096 KB
testcase_07 AC 42 ms
51,840 KB
testcase_08 AC 44 ms
58,368 KB
testcase_09 AC 45 ms
58,368 KB
testcase_10 AC 64 ms
68,224 KB
testcase_11 AC 76 ms
85,120 KB
testcase_12 AC 295 ms
207,000 KB
testcase_13 AC 264 ms
191,844 KB
testcase_14 AC 413 ms
257,632 KB
testcase_15 AC 423 ms
275,368 KB
testcase_16 AC 434 ms
275,264 KB
testcase_17 AC 424 ms
275,644 KB
testcase_18 AC 426 ms
275,396 KB
testcase_19 AC 423 ms
275,268 KB
testcase_20 AC 420 ms
275,520 KB
testcase_21 AC 415 ms
275,648 KB
testcase_22 AC 403 ms
275,520 KB
testcase_23 AC 410 ms
275,528 KB
testcase_24 AC 403 ms
275,508 KB
testcase_25 AC 425 ms
275,400 KB
testcase_26 AC 425 ms
275,396 KB
testcase_27 AC 429 ms
275,268 KB
testcase_28 AC 425 ms
275,140 KB
testcase_29 AC 402 ms
275,392 KB
testcase_30 AC 415 ms
275,652 KB
testcase_31 AC 426 ms
275,140 KB
testcase_32 AC 422 ms
275,396 KB
testcase_33 AC 425 ms
275,520 KB
testcase_34 AC 422 ms
275,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
f = [1 if A[i]!=B[i] else 0 for i in range(N)]
f.append(0)
ans = 0

for i in range(N):
    if f[i]==1 and f[i+1]==0:
        ans += 1

print(ans)
0