結果

問題 No.1183 コイン遊び
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2020-08-22 13:05:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 362 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 82,072 KB
実行使用メモリ 275,856 KB
最終ジャッジ日時 2024-04-23 07:20:43
合計ジャッジ時間 10,245 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,076 KB
testcase_01 AC 39 ms
53,084 KB
testcase_02 AC 40 ms
52,364 KB
testcase_03 AC 38 ms
53,192 KB
testcase_04 AC 38 ms
51,884 KB
testcase_05 AC 40 ms
53,004 KB
testcase_06 AC 39 ms
52,568 KB
testcase_07 AC 37 ms
52,088 KB
testcase_08 AC 42 ms
58,680 KB
testcase_09 AC 46 ms
58,756 KB
testcase_10 AC 52 ms
69,212 KB
testcase_11 AC 64 ms
83,224 KB
testcase_12 AC 245 ms
197,628 KB
testcase_13 AC 224 ms
189,608 KB
testcase_14 AC 316 ms
243,604 KB
testcase_15 AC 347 ms
275,360 KB
testcase_16 AC 346 ms
275,584 KB
testcase_17 AC 342 ms
275,488 KB
testcase_18 AC 355 ms
275,496 KB
testcase_19 AC 347 ms
275,752 KB
testcase_20 AC 348 ms
275,668 KB
testcase_21 AC 342 ms
275,392 KB
testcase_22 AC 337 ms
275,780 KB
testcase_23 AC 332 ms
275,476 KB
testcase_24 AC 341 ms
275,856 KB
testcase_25 AC 354 ms
275,376 KB
testcase_26 AC 362 ms
275,820 KB
testcase_27 AC 354 ms
275,448 KB
testcase_28 AC 346 ms
275,488 KB
testcase_29 AC 335 ms
275,544 KB
testcase_30 AC 341 ms
275,472 KB
testcase_31 AC 351 ms
275,460 KB
testcase_32 AC 347 ms
275,284 KB
testcase_33 AC 347 ms
275,728 KB
testcase_34 AC 345 ms
275,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

N = int(stdin.readline())

A = list(map(int,stdin.readline().split()))
B = list(map(int,stdin.readline().split()))

ans = 0
now = 0
for i in range(N):

    if A[i] ^ B[i] == 1:
       if now == 0:
           now = 1
           ans += 1
    else:
        now = 0

print (ans)
0