結果

問題 No.1183 コイン遊び
ユーザー lemondolemondo
提出日時 2020-08-22 13:18:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 384 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 269,976 KB
最終ジャッジ日時 2024-04-23 07:41:15
合計ジャッジ時間 10,811 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,420 KB
testcase_01 AC 40 ms
53,332 KB
testcase_02 AC 40 ms
52,660 KB
testcase_03 AC 39 ms
53,412 KB
testcase_04 AC 40 ms
52,260 KB
testcase_05 AC 40 ms
52,744 KB
testcase_06 AC 41 ms
52,680 KB
testcase_07 AC 40 ms
52,752 KB
testcase_08 AC 44 ms
59,592 KB
testcase_09 AC 49 ms
58,624 KB
testcase_10 AC 55 ms
68,932 KB
testcase_11 AC 71 ms
85,356 KB
testcase_12 AC 288 ms
208,864 KB
testcase_13 AC 247 ms
199,368 KB
testcase_14 AC 369 ms
263,864 KB
testcase_15 AC 384 ms
269,400 KB
testcase_16 AC 379 ms
269,460 KB
testcase_17 AC 367 ms
269,712 KB
testcase_18 AC 375 ms
269,336 KB
testcase_19 AC 373 ms
269,588 KB
testcase_20 AC 363 ms
269,464 KB
testcase_21 AC 359 ms
269,460 KB
testcase_22 AC 365 ms
269,720 KB
testcase_23 AC 359 ms
269,588 KB
testcase_24 AC 363 ms
269,464 KB
testcase_25 AC 383 ms
269,332 KB
testcase_26 AC 363 ms
269,336 KB
testcase_27 AC 370 ms
269,588 KB
testcase_28 AC 358 ms
269,976 KB
testcase_29 AC 362 ms
269,460 KB
testcase_30 AC 355 ms
269,716 KB
testcase_31 AC 349 ms
269,588 KB
testcase_32 AC 339 ms
269,804 KB
testcase_33 AC 328 ms
269,576 KB
testcase_34 AC 354 ms
269,400 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