結果

問題 No.1183 コイン遊び
ユーザー だれだれ
提出日時 2020-08-22 13:31:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 627 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 34,408 KB
最終ジャッジ日時 2023-08-05 10:35:26
合計ジャッジ時間 15,910 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 16 ms
7,892 KB
testcase_03 AC 16 ms
7,792 KB
testcase_04 AC 15 ms
7,788 KB
testcase_05 AC 15 ms
7,900 KB
testcase_06 AC 15 ms
7,752 KB
testcase_07 AC 15 ms
7,892 KB
testcase_08 AC 15 ms
7,732 KB
testcase_09 AC 16 ms
7,856 KB
testcase_10 AC 27 ms
8,600 KB
testcase_11 AC 50 ms
9,692 KB
testcase_12 AC 372 ms
23,880 KB
testcase_13 AC 342 ms
22,228 KB
testcase_14 AC 550 ms
31,936 KB
testcase_15 AC 581 ms
34,408 KB
testcase_16 AC 584 ms
33,308 KB
testcase_17 AC 585 ms
33,284 KB
testcase_18 AC 591 ms
33,440 KB
testcase_19 AC 592 ms
33,664 KB
testcase_20 AC 597 ms
33,368 KB
testcase_21 AC 609 ms
33,188 KB
testcase_22 AC 579 ms
33,344 KB
testcase_23 AC 523 ms
33,356 KB
testcase_24 AC 580 ms
33,276 KB
testcase_25 AC 622 ms
33,276 KB
testcase_26 AC 583 ms
33,368 KB
testcase_27 AC 617 ms
33,528 KB
testcase_28 AC 589 ms
33,396 KB
testcase_29 AC 566 ms
33,200 KB
testcase_30 AC 603 ms
33,264 KB
testcase_31 AC 598 ms
33,236 KB
testcase_32 AC 578 ms
33,304 KB
testcase_33 AC 585 ms
33,232 KB
testcase_34 AC 627 ms
33,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
flag=0
for i in range(n):
    if a[i]!=b[i]:
        flag=1
    elif a[i]==b[i]:
        if flag:
            ans+=1
            flag=0
if a[-1]!=b[-1]:
    ans+=1
print(ans)
0