結果

問題 No.1183 コイン遊び
ユーザー match1997match1997
提出日時 2020-10-07 08:22:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 790 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 35,856 KB
最終ジャッジ日時 2023-09-27 09:07:51
合計ジャッジ時間 22,334 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,824 KB
testcase_01 AC 13 ms
7,856 KB
testcase_02 AC 14 ms
7,840 KB
testcase_03 AC 13 ms
7,780 KB
testcase_04 AC 13 ms
7,780 KB
testcase_05 AC 14 ms
7,828 KB
testcase_06 AC 13 ms
7,820 KB
testcase_07 AC 13 ms
7,856 KB
testcase_08 AC 13 ms
7,744 KB
testcase_09 AC 14 ms
7,792 KB
testcase_10 AC 27 ms
8,580 KB
testcase_11 AC 59 ms
9,648 KB
testcase_12 AC 449 ms
26,104 KB
testcase_13 AC 418 ms
22,268 KB
testcase_14 AC 730 ms
31,916 KB
testcase_15 AC 766 ms
33,220 KB
testcase_16 AC 739 ms
35,796 KB
testcase_17 AC 776 ms
35,732 KB
testcase_18 AC 758 ms
34,068 KB
testcase_19 AC 740 ms
35,588 KB
testcase_20 AC 717 ms
35,536 KB
testcase_21 AC 719 ms
33,908 KB
testcase_22 AC 671 ms
34,104 KB
testcase_23 AC 717 ms
35,336 KB
testcase_24 AC 695 ms
34,340 KB
testcase_25 AC 790 ms
34,220 KB
testcase_26 AC 718 ms
34,344 KB
testcase_27 AC 725 ms
35,856 KB
testcase_28 AC 742 ms
35,196 KB
testcase_29 AC 718 ms
35,224 KB
testcase_30 AC 777 ms
34,324 KB
testcase_31 AC 772 ms
35,520 KB
testcase_32 AC 736 ms
34,332 KB
testcase_33 AC 749 ms
34,056 KB
testcase_34 AC 727 ms
33,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
*A, = map(int,(input().split()))
*B, = map(int,(input().split()))
if A[0] == B[0]:
    count=0
else:
    count=1
    
for i in range(N-1):
    if A[i]==B[i]:
        if A[i]==B[i] and A[i+1] != B[i+1]:
            count +=1
    else:
        if A[i] != B[i] and A[i+1] == B[i+1]:
            count +=0
print(count)  
0