結果

問題 No.1183 コイン遊び
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2023-06-30 23:31:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 793 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 34,552 KB
最終ジャッジ日時 2023-09-21 17:48:04
合計ジャッジ時間 22,322 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,908 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 AC 15 ms
7,860 KB
testcase_03 AC 16 ms
7,832 KB
testcase_04 AC 15 ms
7,760 KB
testcase_05 AC 15 ms
7,904 KB
testcase_06 AC 15 ms
7,860 KB
testcase_07 AC 15 ms
7,768 KB
testcase_08 AC 16 ms
7,840 KB
testcase_09 AC 17 ms
7,760 KB
testcase_10 AC 30 ms
8,640 KB
testcase_11 AC 62 ms
9,780 KB
testcase_12 AC 491 ms
23,952 KB
testcase_13 AC 438 ms
22,300 KB
testcase_14 AC 730 ms
31,908 KB
testcase_15 AC 773 ms
33,304 KB
testcase_16 AC 776 ms
33,292 KB
testcase_17 AC 777 ms
34,552 KB
testcase_18 AC 775 ms
33,224 KB
testcase_19 AC 787 ms
33,852 KB
testcase_20 AC 786 ms
33,372 KB
testcase_21 AC 718 ms
33,340 KB
testcase_22 AC 710 ms
33,356 KB
testcase_23 AC 717 ms
33,860 KB
testcase_24 AC 740 ms
33,236 KB
testcase_25 AC 793 ms
33,276 KB
testcase_26 AC 775 ms
34,272 KB
testcase_27 AC 779 ms
33,904 KB
testcase_28 AC 778 ms
34,148 KB
testcase_29 AC 715 ms
33,328 KB
testcase_30 AC 783 ms
33,244 KB
testcase_31 AC 770 ms
33,380 KB
testcase_32 AC 769 ms
33,344 KB
testcase_33 AC 773 ms
33,340 KB
testcase_34 AC 793 ms
33,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a, b = [[*map(int, input().split())] for _ in range(2)]

for i, bi in enumerate(b):
    a[i] = (a[i] + bi) % 2

flg = True
cnt = 0
while len(a) > 0:
    if a.pop() == 1:
        if flg:
            cnt += 1
            flg = False
    else:
        flg = True

print(cnt)
0