結果

問題 No.1183 コイン遊び
ユーザー だれだれ
提出日時 2020-08-22 13:31:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 657 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 42,268 KB
最終ジャッジ日時 2024-04-23 07:58:35
合計ジャッジ時間 15,647 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 26 ms
10,880 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 26 ms
10,880 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 25 ms
10,752 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 25 ms
10,752 KB
testcase_10 AC 37 ms
11,392 KB
testcase_11 AC 64 ms
12,488 KB
testcase_12 AC 396 ms
30,616 KB
testcase_13 AC 346 ms
26,952 KB
testcase_14 AC 572 ms
39,384 KB
testcase_15 AC 634 ms
41,200 KB
testcase_16 AC 609 ms
41,592 KB
testcase_17 AC 602 ms
42,268 KB
testcase_18 AC 602 ms
40,440 KB
testcase_19 AC 617 ms
41,212 KB
testcase_20 AC 610 ms
41,776 KB
testcase_21 AC 591 ms
41,452 KB
testcase_22 AC 581 ms
41,340 KB
testcase_23 AC 532 ms
40,468 KB
testcase_24 AC 592 ms
41,336 KB
testcase_25 AC 612 ms
41,208 KB
testcase_26 AC 607 ms
40,376 KB
testcase_27 AC 616 ms
40,408 KB
testcase_28 AC 602 ms
41,776 KB
testcase_29 AC 580 ms
42,140 KB
testcase_30 AC 657 ms
41,080 KB
testcase_31 AC 622 ms
40,652 KB
testcase_32 AC 613 ms
41,896 KB
testcase_33 AC 605 ms
41,304 KB
testcase_34 AC 609 ms
40,032 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