結果

問題 No.1183 コイン遊び
ユーザー hir355hir355
提出日時 2020-08-22 13:17:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 818 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 37,296 KB
最終ジャッジ日時 2024-04-23 07:40:23
合計ジャッジ時間 19,367 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 28 ms
10,880 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 25 ms
10,880 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 28 ms
10,752 KB
testcase_10 AC 41 ms
11,392 KB
testcase_11 AC 73 ms
12,492 KB
testcase_12 AC 531 ms
26,696 KB
testcase_13 AC 470 ms
24,888 KB
testcase_14 AC 743 ms
35,592 KB
testcase_15 AC 801 ms
36,060 KB
testcase_16 AC 774 ms
36,124 KB
testcase_17 AC 774 ms
37,032 KB
testcase_18 AC 789 ms
37,028 KB
testcase_19 AC 810 ms
37,024 KB
testcase_20 AC 787 ms
36,064 KB
testcase_21 AC 717 ms
36,064 KB
testcase_22 AC 713 ms
36,128 KB
testcase_23 AC 749 ms
36,068 KB
testcase_24 AC 757 ms
36,260 KB
testcase_25 AC 775 ms
36,068 KB
testcase_26 AC 812 ms
36,136 KB
testcase_27 AC 818 ms
36,220 KB
testcase_28 AC 781 ms
36,068 KB
testcase_29 AC 763 ms
36,196 KB
testcase_30 AC 805 ms
36,064 KB
testcase_31 AC 786 ms
37,296 KB
testcase_32 AC 785 ms
36,140 KB
testcase_33 AC 770 ms
36,128 KB
testcase_34 AC 762 ms
36,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = [0] * (n + 2)
for i in range(n):
    c[i + 1] = a[i] ^ b[i]
ans = 0
for i in range(n + 1):
    if c[i] != c[i + 1]:
        ans += 1
print(ans // 2)
0