結果

問題 No.1183 コイン遊び
ユーザー qumazakiqumazaki
提出日時 2020-09-12 02:08:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 392 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 757 ms
コンパイル使用メモリ 86,452 KB
実行使用メモリ 273,008 KB
最終ジャッジ日時 2023-08-28 14:08:41
合計ジャッジ時間 14,677 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,180 KB
testcase_01 AC 69 ms
71,148 KB
testcase_02 AC 71 ms
71,244 KB
testcase_03 AC 70 ms
71,244 KB
testcase_04 AC 71 ms
71,212 KB
testcase_05 AC 71 ms
71,148 KB
testcase_06 AC 72 ms
71,220 KB
testcase_07 AC 72 ms
71,192 KB
testcase_08 AC 75 ms
75,516 KB
testcase_09 AC 74 ms
75,712 KB
testcase_10 AC 86 ms
77,700 KB
testcase_11 AC 101 ms
93,388 KB
testcase_12 AC 308 ms
245,980 KB
testcase_13 AC 278 ms
221,680 KB
testcase_14 AC 381 ms
272,144 KB
testcase_15 AC 391 ms
272,444 KB
testcase_16 AC 391 ms
272,708 KB
testcase_17 AC 388 ms
272,360 KB
testcase_18 AC 392 ms
272,348 KB
testcase_19 AC 388 ms
272,564 KB
testcase_20 AC 391 ms
272,412 KB
testcase_21 AC 380 ms
272,828 KB
testcase_22 AC 378 ms
272,340 KB
testcase_23 AC 378 ms
272,240 KB
testcase_24 AC 376 ms
272,384 KB
testcase_25 AC 392 ms
272,648 KB
testcase_26 AC 388 ms
272,936 KB
testcase_27 AC 387 ms
273,008 KB
testcase_28 AC 390 ms
272,368 KB
testcase_29 AC 386 ms
272,824 KB
testcase_30 AC 383 ms
272,380 KB
testcase_31 AC 381 ms
272,372 KB
testcase_32 AC 383 ms
272,572 KB
testcase_33 AC 385 ms
272,608 KB
testcase_34 AC 388 ms
272,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

c = [ai^bi for ai,bi in zip(a,b) ]
for i in range(1,n):
    if(c[i]==c[i-1]==1):
        c[i-1] -= 1
print(sum(c))
0