結果

問題 No.1183 コイン遊び
ユーザー Chihaya_chanChihaya_chan
提出日時 2020-09-01 23:46:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 41,172 KB
最終ジャッジ日時 2024-04-30 23:18:38
合計ジャッジ時間 19,118 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 25 ms
10,880 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 27 ms
10,880 KB
testcase_09 AC 27 ms
10,752 KB
testcase_10 WA -
testcase_11 AC 69 ms
12,504 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 676 ms
34,432 KB
testcase_15 AC 733 ms
41,172 KB
testcase_16 WA -
testcase_17 AC 707 ms
36,080 KB
testcase_18 WA -
testcase_19 AC 718 ms
36,152 KB
testcase_20 WA -
testcase_21 AC 703 ms
36,152 KB
testcase_22 AC 677 ms
36,080 KB
testcase_23 AC 627 ms
36,608 KB
testcase_24 AC 707 ms
36,084 KB
testcase_25 WA -
testcase_26 AC 703 ms
36,084 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 712 ms
36,084 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 728 ms
36,148 KB
testcase_33 AC 728 ms
36,140 KB
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = [(A[i] - B[i]) % 2 for i in range(N)]

res = 0

for i in range(N-1):
    res += (C[i] == 0 and  C[i+1] == 1)

if C[-1] == 1:
    res += 1

print(res)
0