結果

問題 No.1183 コイン遊び
ユーザー Somtk_42Somtk_42
提出日時 2020-08-22 13:04:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 744 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 37,024 KB
最終ジャッジ日時 2024-04-23 07:20:16
合計ジャッジ時間 16,711 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 24 ms
10,752 KB
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 25 ms
10,752 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 37 ms
11,264 KB
testcase_11 AC 62 ms
12,476 KB
testcase_12 AC 404 ms
26,812 KB
testcase_13 AC 365 ms
25,096 KB
testcase_14 AC 606 ms
34,584 KB
testcase_15 AC 693 ms
36,048 KB
testcase_16 AC 642 ms
37,024 KB
testcase_17 AC 674 ms
36,060 KB
testcase_18 AC 629 ms
36,128 KB
testcase_19 AC 629 ms
36,056 KB
testcase_20 AC 685 ms
36,304 KB
testcase_21 AC 575 ms
36,060 KB
testcase_22 AC 578 ms
36,060 KB
testcase_23 AC 640 ms
36,128 KB
testcase_24 AC 641 ms
36,132 KB
testcase_25 AC 674 ms
36,060 KB
testcase_26 AC 636 ms
36,060 KB
testcase_27 AC 640 ms
36,184 KB
testcase_28 AC 634 ms
36,184 KB
testcase_29 AC 594 ms
36,220 KB
testcase_30 AC 649 ms
36,552 KB
testcase_31 AC 645 ms
36,124 KB
testcase_32 AC 655 ms
36,188 KB
testcase_33 AC 744 ms
36,116 KB
testcase_34 AC 677 ms
36,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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