結果

問題 No.1183 コイン遊び
ユーザー lloyzlloyz
提出日時 2022-05-11 22:35:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 10,520 KB
実行使用メモリ 34,452 KB
最終ジャッジ日時 2023-09-26 14:02:29
合計ジャッジ時間 18,444 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,756 KB
testcase_01 AC 14 ms
7,804 KB
testcase_02 AC 15 ms
7,880 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,892 KB
testcase_05 WA -
testcase_06 AC 16 ms
7,828 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 49 ms
9,556 KB
testcase_12 AC 368 ms
26,376 KB
testcase_13 WA -
testcase_14 AC 547 ms
31,908 KB
testcase_15 WA -
testcase_16 AC 591 ms
33,400 KB
testcase_17 WA -
testcase_18 AC 575 ms
33,364 KB
testcase_19 WA -
testcase_20 AC 603 ms
33,372 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 585 ms
33,764 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 578 ms
33,276 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 601 ms
33,276 KB
testcase_32 WA -
testcase_33 AC 572 ms
34,056 KB
testcase_34 AC 577 ms
33,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
miss_flag = False
for i in range(n):
    if A[i] == B[i]:
        if not miss_flag:
            ans += 1
        miss_flag = True
    else:
        miss_flag = False
        if i == n - 1:
            ans += 1
print(ans)
0