結果

問題 No.1863 Xor Sum 2...?
ユーザー shobonvipshobonvip
提出日時 2022-03-04 22:38:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 541 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 100,832 KB
最終ジャッジ日時 2023-09-26 01:45:40
合計ジャッジ時間 5,587 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,136 KB
testcase_01 AC 74 ms
71,472 KB
testcase_02 AC 74 ms
71,152 KB
testcase_03 AC 73 ms
71,248 KB
testcase_04 WA -
testcase_05 AC 97 ms
77,880 KB
testcase_06 AC 84 ms
76,328 KB
testcase_07 AC 92 ms
81,552 KB
testcase_08 AC 91 ms
81,412 KB
testcase_09 AC 115 ms
100,440 KB
testcase_10 AC 109 ms
97,440 KB
testcase_11 AC 95 ms
85,736 KB
testcase_12 AC 88 ms
81,480 KB
testcase_13 AC 105 ms
91,976 KB
testcase_14 AC 110 ms
97,200 KB
testcase_15 AC 100 ms
91,488 KB
testcase_16 AC 104 ms
91,652 KB
testcase_17 AC 91 ms
82,664 KB
testcase_18 AC 81 ms
76,732 KB
testcase_19 AC 91 ms
80,696 KB
testcase_20 AC 98 ms
87,552 KB
testcase_21 AC 107 ms
94,536 KB
testcase_22 AC 90 ms
79,284 KB
testcase_23 AC 116 ms
99,948 KB
testcase_24 AC 118 ms
100,284 KB
testcase_25 AC 116 ms
100,832 KB
testcase_26 AC 116 ms
100,500 KB
testcase_27 AC 117 ms
100,408 KB
testcase_28 AC 120 ms
100,632 KB
testcase_29 AC 120 ms
100,568 KB
testcase_30 AC 119 ms
100,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
for i in range(n-1):
	if (a[i] + a[i + 1]) - (a[i] ^ a[i + 1]) == b[i] ^ b[i+1]:
		ans += 1

for i in range(n):
	if b[i] == 0:
		ans += 1

print(ans)
0