結果

問題 No.1183 コイン遊び
ユーザー matsu7874matsu7874
提出日時 2020-08-22 13:23:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 760 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 37,364 KB
最終ジャッジ日時 2024-04-23 07:49:07
合計ジャッジ時間 17,928 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 25 ms
10,624 KB
testcase_04 AC 24 ms
10,752 KB
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 28 ms
10,624 KB
testcase_10 AC 40 ms
11,264 KB
testcase_11 AC 67 ms
12,504 KB
testcase_12 AC 418 ms
26,648 KB
testcase_13 AC 373 ms
24,756 KB
testcase_14 AC 616 ms
34,340 KB
testcase_15 AC 668 ms
35,932 KB
testcase_16 AC 668 ms
36,328 KB
testcase_17 AC 651 ms
35,956 KB
testcase_18 AC 749 ms
36,780 KB
testcase_19 AC 674 ms
36,084 KB
testcase_20 AC 666 ms
36,024 KB
testcase_21 AC 569 ms
36,080 KB
testcase_22 AC 552 ms
36,660 KB
testcase_23 AC 567 ms
35,956 KB
testcase_24 AC 577 ms
36,080 KB
testcase_25 AC 661 ms
36,080 KB
testcase_26 AC 722 ms
36,084 KB
testcase_27 AC 685 ms
36,276 KB
testcase_28 AC 693 ms
36,212 KB
testcase_29 AC 580 ms
36,148 KB
testcase_30 AC 760 ms
37,364 KB
testcase_31 AC 652 ms
36,280 KB
testcase_32 AC 698 ms
35,956 KB
testcase_33 AC 674 ms
36,700 KB
testcase_34 AC 684 ms
36,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

cnt = 0
i = 0
j = 0
while i < n:
    while i < n and a[i] == b[i]:
        i += 1
    if i == n:
        break
    j = i+1
    while j < n and a[j] != b[j]:
        j += 1
    i = j
    cnt += 1
print(cnt)
0