結果

問題 No.1183 コイン遊び
ユーザー lemondolemondo
提出日時 2020-08-22 13:18:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 374 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 274,980 KB
最終ジャッジ日時 2023-08-05 10:09:37
合計ジャッジ時間 11,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,220 KB
testcase_01 AC 72 ms
71,500 KB
testcase_02 AC 71 ms
71,416 KB
testcase_03 AC 75 ms
71,412 KB
testcase_04 AC 73 ms
71,168 KB
testcase_05 AC 71 ms
71,452 KB
testcase_06 AC 72 ms
71,608 KB
testcase_07 AC 71 ms
71,408 KB
testcase_08 AC 73 ms
75,744 KB
testcase_09 AC 74 ms
75,916 KB
testcase_10 AC 90 ms
78,296 KB
testcase_11 AC 94 ms
91,952 KB
testcase_12 AC 268 ms
211,568 KB
testcase_13 AC 243 ms
198,424 KB
testcase_14 AC 345 ms
265,972 KB
testcase_15 AC 366 ms
273,912 KB
testcase_16 AC 363 ms
273,984 KB
testcase_17 AC 373 ms
273,840 KB
testcase_18 AC 370 ms
274,216 KB
testcase_19 AC 369 ms
274,252 KB
testcase_20 AC 370 ms
273,800 KB
testcase_21 AC 363 ms
274,084 KB
testcase_22 AC 362 ms
273,988 KB
testcase_23 AC 360 ms
273,672 KB
testcase_24 AC 356 ms
273,816 KB
testcase_25 AC 366 ms
274,192 KB
testcase_26 AC 369 ms
273,816 KB
testcase_27 AC 374 ms
273,656 KB
testcase_28 AC 366 ms
274,188 KB
testcase_29 AC 351 ms
273,772 KB
testcase_30 AC 356 ms
273,772 KB
testcase_31 AC 366 ms
274,032 KB
testcase_32 AC 368 ms
273,792 KB
testcase_33 AC 374 ms
273,656 KB
testcase_34 AC 367 ms
274,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
As = list(mapint())+[-1]
Bs = list(mapint())+[-1]

cnt = 0
ans = 0
for i in range(N+1):
    if As[i]==Bs[i]:
        if cnt>0:
            ans += 1
            cnt = 0
    else:
        cnt += 1
print(ans)
0