結果

問題 No.1183 コイン遊び
ユーザー nohakai3nohakai3
提出日時 2022-07-19 15:39:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 566 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 34,348 KB
最終ジャッジ日時 2023-09-14 11:09:54
合計ジャッジ時間 16,246 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,856 KB
testcase_01 AC 15 ms
7,940 KB
testcase_02 AC 16 ms
7,876 KB
testcase_03 AC 15 ms
7,880 KB
testcase_04 AC 15 ms
7,876 KB
testcase_05 AC 15 ms
7,804 KB
testcase_06 AC 15 ms
7,800 KB
testcase_07 AC 16 ms
7,956 KB
testcase_08 AC 16 ms
7,768 KB
testcase_09 AC 16 ms
7,892 KB
testcase_10 AC 26 ms
8,672 KB
testcase_11 AC 47 ms
9,564 KB
testcase_12 AC 339 ms
26,188 KB
testcase_13 AC 306 ms
24,196 KB
testcase_14 AC 527 ms
32,020 KB
testcase_15 AC 528 ms
33,248 KB
testcase_16 AC 533 ms
33,380 KB
testcase_17 AC 538 ms
33,400 KB
testcase_18 AC 541 ms
33,328 KB
testcase_19 AC 545 ms
33,396 KB
testcase_20 AC 566 ms
34,348 KB
testcase_21 AC 484 ms
33,404 KB
testcase_22 AC 483 ms
33,444 KB
testcase_23 AC 522 ms
34,212 KB
testcase_24 AC 497 ms
33,308 KB
testcase_25 AC 538 ms
33,964 KB
testcase_26 AC 540 ms
33,460 KB
testcase_27 AC 546 ms
33,828 KB
testcase_28 AC 544 ms
33,864 KB
testcase_29 AC 515 ms
33,432 KB
testcase_30 AC 564 ms
33,532 KB
testcase_31 AC 534 ms
33,412 KB
testcase_32 AC 541 ms
33,272 KB
testcase_33 AC 536 ms
34,188 KB
testcase_34 AC 537 ms
33,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans,on=0,0
for i in range(n):
    if A[i]==B[i]:
        if on==1:
            ans+=1
            on=0
    else:
        on=1

if on==1:
    ans+=1
print(ans)
0