結果

問題 No.1183 コイン遊び
ユーザー 8nd5t8nd5t
提出日時 2020-10-02 19:38:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 675 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 86,504 KB
実行使用メモリ 277,384 KB
最終ジャッジ日時 2023-09-23 01:44:23
合計ジャッジ時間 22,471 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 231 ms
83,664 KB
testcase_01 AC 230 ms
83,488 KB
testcase_02 AC 235 ms
83,516 KB
testcase_03 AC 227 ms
83,292 KB
testcase_04 AC 227 ms
83,528 KB
testcase_05 AC 231 ms
83,512 KB
testcase_06 AC 234 ms
83,348 KB
testcase_07 AC 235 ms
83,616 KB
testcase_08 AC 232 ms
84,080 KB
testcase_09 AC 233 ms
84,156 KB
testcase_10 AC 242 ms
85,904 KB
testcase_11 AC 253 ms
98,292 KB
testcase_12 AC 507 ms
207,228 KB
testcase_13 AC 453 ms
198,568 KB
testcase_14 AC 567 ms
251,644 KB
testcase_15 AC 675 ms
276,484 KB
testcase_16 AC 543 ms
277,024 KB
testcase_17 AC 527 ms
276,952 KB
testcase_18 AC 539 ms
277,236 KB
testcase_19 AC 541 ms
277,120 KB
testcase_20 AC 533 ms
276,912 KB
testcase_21 AC 518 ms
277,096 KB
testcase_22 AC 521 ms
277,384 KB
testcase_23 AC 522 ms
277,348 KB
testcase_24 AC 519 ms
277,320 KB
testcase_25 AC 538 ms
277,176 KB
testcase_26 AC 530 ms
276,920 KB
testcase_27 AC 533 ms
277,244 KB
testcase_28 AC 530 ms
277,184 KB
testcase_29 AC 503 ms
276,924 KB
testcase_30 AC 521 ms
277,288 KB
testcase_31 AC 532 ms
277,064 KB
testcase_32 AC 535 ms
277,024 KB
testcase_33 AC 537 ms
277,068 KB
testcase_34 AC 533 ms
276,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
a = inpl()
b = inpl()
f = False
res = 0
for i in range(n):
    if not f and a[i] != b[i]:
        f = True
    elif f and a[i] == b[i]:
        f = False
        res += 1
if f: res += 1
print(res)
0