結果

問題 No.1183 コイン遊び
ユーザー ohanaohana
提出日時 2023-11-06 15:13:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 496 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 81,788 KB
実行使用メモリ 275,752 KB
最終ジャッジ日時 2023-11-06 15:13:55
合計ジャッジ時間 15,129 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,624 KB
testcase_01 AC 35 ms
53,624 KB
testcase_02 AC 36 ms
53,624 KB
testcase_03 AC 35 ms
53,624 KB
testcase_04 AC 36 ms
53,624 KB
testcase_05 AC 36 ms
53,624 KB
testcase_06 AC 35 ms
53,624 KB
testcase_07 AC 36 ms
53,624 KB
testcase_08 AC 39 ms
59,612 KB
testcase_09 AC 40 ms
59,612 KB
testcase_10 AC 50 ms
69,948 KB
testcase_11 AC 70 ms
90,748 KB
testcase_12 AC 350 ms
268,428 KB
testcase_13 AC 290 ms
239,792 KB
testcase_14 AC 420 ms
268,916 KB
testcase_15 AC 430 ms
275,692 KB
testcase_16 AC 440 ms
275,752 KB
testcase_17 AC 425 ms
275,696 KB
testcase_18 AC 430 ms
275,696 KB
testcase_19 AC 484 ms
275,696 KB
testcase_20 AC 434 ms
275,696 KB
testcase_21 AC 387 ms
275,420 KB
testcase_22 AC 407 ms
275,420 KB
testcase_23 AC 378 ms
275,420 KB
testcase_24 AC 379 ms
275,416 KB
testcase_25 AC 437 ms
275,696 KB
testcase_26 AC 437 ms
275,696 KB
testcase_27 AC 429 ms
275,696 KB
testcase_28 AC 496 ms
275,696 KB
testcase_29 AC 370 ms
275,420 KB
testcase_30 AC 449 ms
275,696 KB
testcase_31 AC 459 ms
275,696 KB
testcase_32 AC 428 ms
275,696 KB
testcase_33 AC 430 ms
275,752 KB
testcase_34 AC 456 ms
275,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

_ = int(input())

A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = [a != b for a, b in zip(A, B)]

ans = []
for k, g in itertools.groupby(C):
    ans.append(k)

print(sum(ans))
0