結果

問題 No.1183 コイン遊び
ユーザー brthyyjpbrthyyjp
提出日時 2020-10-19 01:11:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 472 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 1,177 ms
コンパイル使用メモリ 86,500 KB
実行使用メモリ 272,996 KB
最終ジャッジ日時 2023-09-28 12:10:02
合計ジャッジ時間 15,084 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,260 KB
testcase_01 AC 72 ms
71,320 KB
testcase_02 AC 73 ms
71,460 KB
testcase_03 AC 72 ms
71,284 KB
testcase_04 AC 73 ms
71,464 KB
testcase_05 AC 73 ms
71,508 KB
testcase_06 AC 74 ms
71,376 KB
testcase_07 AC 74 ms
71,396 KB
testcase_08 AC 76 ms
75,796 KB
testcase_09 AC 77 ms
75,768 KB
testcase_10 AC 90 ms
78,004 KB
testcase_11 AC 107 ms
93,592 KB
testcase_12 AC 429 ms
271,012 KB
testcase_13 AC 332 ms
241,496 KB
testcase_14 AC 416 ms
271,992 KB
testcase_15 AC 429 ms
272,588 KB
testcase_16 AC 430 ms
272,920 KB
testcase_17 AC 430 ms
272,716 KB
testcase_18 AC 429 ms
272,996 KB
testcase_19 AC 472 ms
272,708 KB
testcase_20 AC 419 ms
272,532 KB
testcase_21 AC 389 ms
272,560 KB
testcase_22 AC 389 ms
272,656 KB
testcase_23 AC 388 ms
272,652 KB
testcase_24 AC 388 ms
272,548 KB
testcase_25 AC 420 ms
272,740 KB
testcase_26 AC 423 ms
272,704 KB
testcase_27 AC 421 ms
272,504 KB
testcase_28 AC 424 ms
272,760 KB
testcase_29 AC 393 ms
272,720 KB
testcase_30 AC 415 ms
272,708 KB
testcase_31 AC 423 ms
272,736 KB
testcase_32 AC 425 ms
272,716 KB
testcase_33 AC 420 ms
272,604 KB
testcase_34 AC 418 ms
272,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))
B = list(map(int, input().split()))

C = []
for a ,b in zip(A, B):
    if a == b:
        C.append(0)
    else:
        C.append(1)
X = []
cur = C[0]
cnt = 0
for c in C:
    if c == cur:
        cnt += 1
    else:
        X.append(cur)
        cur = c
        cnt = 1
else:
    X.append(cur)
print(sum(X))
0