結果

問題 No.1183 コイン遊び
ユーザー hiragnhiragn
提出日時 2022-11-22 15:40:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,479 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 11,876 KB
実行使用メモリ 90,864 KB
最終ジャッジ日時 2023-10-24 08:02:08
合計ジャッジ時間 47,272 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 457 ms
42,376 KB
testcase_01 AC 461 ms
42,236 KB
testcase_02 AC 460 ms
42,496 KB
testcase_03 AC 461 ms
42,236 KB
testcase_04 AC 464 ms
42,236 KB
testcase_05 AC 464 ms
42,496 KB
testcase_06 AC 462 ms
42,376 KB
testcase_07 AC 461 ms
42,376 KB
testcase_08 AC 466 ms
42,236 KB
testcase_09 AC 459 ms
42,236 KB
testcase_10 AC 484 ms
42,236 KB
testcase_11 AC 518 ms
42,236 KB
testcase_12 AC 1,140 ms
67,652 KB
testcase_13 AC 1,047 ms
64,888 KB
testcase_14 AC 1,397 ms
80,056 KB
testcase_15 AC 1,460 ms
83,200 KB
testcase_16 AC 1,462 ms
83,204 KB
testcase_17 AC 1,469 ms
83,208 KB
testcase_18 AC 1,479 ms
83,472 KB
testcase_19 AC 1,476 ms
83,472 KB
testcase_20 AC 1,468 ms
83,472 KB
testcase_21 AC 1,434 ms
76,028 KB
testcase_22 AC 1,435 ms
76,028 KB
testcase_23 AC 1,415 ms
76,028 KB
testcase_24 AC 1,413 ms
76,028 KB
testcase_25 AC 1,460 ms
83,472 KB
testcase_26 AC 1,466 ms
83,472 KB
testcase_27 AC 1,464 ms
83,472 KB
testcase_28 AC 1,466 ms
83,472 KB
testcase_29 AC 1,412 ms
76,028 KB
testcase_30 AC 1,436 ms
90,864 KB
testcase_31 AC 1,469 ms
83,472 KB
testcase_32 AC 1,469 ms
83,472 KB
testcase_33 AC 1,468 ms
83,204 KB
testcase_34 AC 1,460 ms
83,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))

    arr = [0] + list(map(int, np.logical_xor(a, b)))
    ans = len([i for i in range(n) if arr[i:i + 2] == [0, 1]])
    print(ans)


if __name__ == "__main__":
    main()
0