結果

問題 No.1183 コイン遊び
ユーザー syunsukesyunsuke
提出日時 2020-11-02 21:18:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 389 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 272,816 KB
最終ジャッジ日時 2023-09-29 13:46:21
合計ジャッジ時間 14,070 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,172 KB
testcase_01 AC 69 ms
71,452 KB
testcase_02 AC 70 ms
71,168 KB
testcase_03 AC 68 ms
70,972 KB
testcase_04 AC 69 ms
71,156 KB
testcase_05 AC 68 ms
71,164 KB
testcase_06 AC 69 ms
71,152 KB
testcase_07 AC 67 ms
71,348 KB
testcase_08 AC 75 ms
75,552 KB
testcase_09 AC 73 ms
75,756 KB
testcase_10 AC 82 ms
78,096 KB
testcase_11 AC 98 ms
93,264 KB
testcase_12 AC 309 ms
243,812 KB
testcase_13 AC 286 ms
222,520 KB
testcase_14 AC 368 ms
271,868 KB
testcase_15 AC 389 ms
272,680 KB
testcase_16 AC 389 ms
272,468 KB
testcase_17 AC 385 ms
272,516 KB
testcase_18 AC 385 ms
272,316 KB
testcase_19 AC 377 ms
272,352 KB
testcase_20 AC 384 ms
272,340 KB
testcase_21 AC 365 ms
272,636 KB
testcase_22 AC 364 ms
272,224 KB
testcase_23 AC 370 ms
272,184 KB
testcase_24 AC 361 ms
272,168 KB
testcase_25 AC 380 ms
272,280 KB
testcase_26 AC 383 ms
272,816 KB
testcase_27 AC 382 ms
272,344 KB
testcase_28 AC 376 ms
272,788 KB
testcase_29 AC 361 ms
272,620 KB
testcase_30 AC 376 ms
272,156 KB
testcase_31 AC 378 ms
272,708 KB
testcase_32 AC 376 ms
272,508 KB
testcase_33 AC 377 ms
272,300 KB
testcase_34 AC 383 ms
272,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

C=[0]
for i in range(N):
    C.append(abs(A[i]-B[i]))
C.append(0)
cnt=0
for i in range(1,N+2):
    if C[i]==1 and C[i-1]==0:
        cnt+=1
print(cnt)
0