結果

問題 No.1183 コイン遊び
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-08-23 12:05:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 898 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 40,108 KB
最終ジャッジ日時 2024-04-23 17:33:09
合計ジャッジ時間 21,797 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 26 ms
10,880 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 26 ms
10,752 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 26 ms
10,880 KB
testcase_07 AC 25 ms
10,752 KB
testcase_08 AC 26 ms
10,880 KB
testcase_09 AC 26 ms
10,752 KB
testcase_10 AC 41 ms
11,392 KB
testcase_11 AC 75 ms
12,484 KB
testcase_12 AC 568 ms
29,004 KB
testcase_13 AC 500 ms
26,948 KB
testcase_14 AC 812 ms
34,480 KB
testcase_15 AC 849 ms
40,108 KB
testcase_16 AC 839 ms
36,256 KB
testcase_17 AC 890 ms
36,164 KB
testcase_18 AC 845 ms
36,028 KB
testcase_19 AC 857 ms
36,160 KB
testcase_20 AC 857 ms
36,028 KB
testcase_21 AC 763 ms
36,160 KB
testcase_22 AC 801 ms
36,288 KB
testcase_23 AC 848 ms
36,036 KB
testcase_24 AC 831 ms
36,144 KB
testcase_25 AC 858 ms
36,152 KB
testcase_26 AC 885 ms
36,148 KB
testcase_27 AC 853 ms
36,160 KB
testcase_28 AC 864 ms
36,156 KB
testcase_29 AC 773 ms
36,284 KB
testcase_30 AC 898 ms
36,148 KB
testcase_31 AC 881 ms
36,160 KB
testcase_32 AC 882 ms
36,156 KB
testcase_33 AC 881 ms
36,156 KB
testcase_34 AC 856 ms
39,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
l = []
for i in range(n):
    l.append(int(a[i] != b[i]))
cur = l[0]
ans = 0
for i in range(1, n):
    if l[i - 1] == 1 and l[i] == 0:
        ans += 1
        cur = 0
ans += l[-1]
print(ans)
0