結果

問題 No.1183 コイン遊び
ユーザー roarisroaris
提出日時 2020-08-22 16:18:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 456 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 768 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 272,588 KB
最終ジャッジ日時 2023-08-05 13:17:15
合計ジャッジ時間 13,140 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,388 KB
testcase_01 AC 68 ms
71,092 KB
testcase_02 AC 70 ms
71,240 KB
testcase_03 AC 70 ms
71,004 KB
testcase_04 AC 70 ms
71,148 KB
testcase_05 AC 69 ms
71,004 KB
testcase_06 AC 70 ms
71,252 KB
testcase_07 AC 69 ms
70,852 KB
testcase_08 AC 72 ms
75,388 KB
testcase_09 AC 73 ms
75,352 KB
testcase_10 AC 82 ms
77,572 KB
testcase_11 AC 96 ms
90,656 KB
testcase_12 AC 364 ms
208,880 KB
testcase_13 AC 456 ms
190,964 KB
testcase_14 AC 417 ms
265,344 KB
testcase_15 AC 384 ms
272,164 KB
testcase_16 AC 398 ms
272,096 KB
testcase_17 AC 374 ms
272,212 KB
testcase_18 AC 381 ms
272,144 KB
testcase_19 AC 374 ms
272,308 KB
testcase_20 AC 373 ms
272,436 KB
testcase_21 AC 365 ms
272,256 KB
testcase_22 AC 354 ms
271,896 KB
testcase_23 AC 362 ms
272,236 KB
testcase_24 AC 367 ms
272,152 KB
testcase_25 AC 380 ms
272,412 KB
testcase_26 AC 390 ms
272,000 KB
testcase_27 AC 379 ms
272,528 KB
testcase_28 AC 381 ms
272,432 KB
testcase_29 AC 359 ms
272,588 KB
testcase_30 AC 363 ms
272,048 KB
testcase_31 AC 384 ms
272,380 KB
testcase_32 AC 378 ms
272,196 KB
testcase_33 AC 378 ms
271,968 KB
testcase_34 AC 386 ms
272,408 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