結果

問題 No.1183 コイン遊び
ユーザー dangodango
提出日時 2023-06-25 09:04:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 417 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 547 ms
コンパイル使用メモリ 86,756 KB
実行使用メモリ 272,980 KB
最終ジャッジ日時 2023-09-15 06:46:30
合計ジャッジ時間 12,988 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,612 KB
testcase_01 AC 66 ms
71,296 KB
testcase_02 AC 67 ms
71,276 KB
testcase_03 AC 68 ms
71,248 KB
testcase_04 AC 67 ms
71,436 KB
testcase_05 AC 70 ms
71,296 KB
testcase_06 AC 68 ms
71,144 KB
testcase_07 AC 69 ms
71,608 KB
testcase_08 AC 72 ms
75,772 KB
testcase_09 AC 70 ms
75,816 KB
testcase_10 AC 80 ms
77,796 KB
testcase_11 AC 96 ms
90,268 KB
testcase_12 AC 323 ms
212,756 KB
testcase_13 AC 272 ms
189,640 KB
testcase_14 AC 388 ms
259,160 KB
testcase_15 AC 417 ms
272,720 KB
testcase_16 AC 413 ms
272,888 KB
testcase_17 AC 417 ms
272,648 KB
testcase_18 AC 416 ms
272,744 KB
testcase_19 AC 410 ms
272,664 KB
testcase_20 AC 409 ms
272,596 KB
testcase_21 AC 392 ms
272,600 KB
testcase_22 AC 406 ms
272,348 KB
testcase_23 AC 398 ms
272,548 KB
testcase_24 AC 403 ms
272,444 KB
testcase_25 AC 411 ms
272,812 KB
testcase_26 AC 416 ms
272,700 KB
testcase_27 AC 409 ms
272,588 KB
testcase_28 AC 403 ms
272,720 KB
testcase_29 AC 394 ms
272,260 KB
testcase_30 AC 401 ms
272,824 KB
testcase_31 AC 408 ms
272,980 KB
testcase_32 AC 407 ms
272,920 KB
testcase_33 AC 402 ms
272,820 KB
testcase_34 AC 406 ms
272,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
na, nb = 0, 0
ans = 0
for x, y, r in zip(list(map(int, input().split())), list(map(int, input().split())), range(n)):
  if r == 0 and x ^ y:
    ans += 1
  elif (x != y) and (na == nb):
    ans += 1
  na, nb = x, y
print(ans)
0