結果

問題 No.1183 コイン遊び
ユーザー mlihua09mlihua09
提出日時 2020-08-22 13:08:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 337 ms / 2,000 ms
コード長 354 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 270,132 KB
最終ジャッジ日時 2024-04-23 07:26:24
合計ジャッジ時間 9,504 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,648 KB
testcase_01 AC 33 ms
52,308 KB
testcase_02 AC 34 ms
52,064 KB
testcase_03 AC 33 ms
52,948 KB
testcase_04 AC 33 ms
53,744 KB
testcase_05 AC 33 ms
52,684 KB
testcase_06 AC 32 ms
52,156 KB
testcase_07 AC 33 ms
52,880 KB
testcase_08 AC 36 ms
59,892 KB
testcase_09 AC 38 ms
59,880 KB
testcase_10 AC 46 ms
70,512 KB
testcase_11 AC 60 ms
87,720 KB
testcase_12 AC 225 ms
207,452 KB
testcase_13 AC 205 ms
198,876 KB
testcase_14 AC 337 ms
263,272 KB
testcase_15 AC 321 ms
269,868 KB
testcase_16 AC 314 ms
269,936 KB
testcase_17 AC 337 ms
270,132 KB
testcase_18 AC 320 ms
269,700 KB
testcase_19 AC 320 ms
269,448 KB
testcase_20 AC 321 ms
269,732 KB
testcase_21 AC 307 ms
269,496 KB
testcase_22 AC 314 ms
269,188 KB
testcase_23 AC 305 ms
269,704 KB
testcase_24 AC 303 ms
269,184 KB
testcase_25 AC 318 ms
269,572 KB
testcase_26 AC 319 ms
269,440 KB
testcase_27 AC 319 ms
269,832 KB
testcase_28 AC 317 ms
269,980 KB
testcase_29 AC 305 ms
269,572 KB
testcase_30 AC 306 ms
269,320 KB
testcase_31 AC 321 ms
270,008 KB
testcase_32 AC 315 ms
269,500 KB
testcase_33 AC 322 ms
269,680 KB
testcase_34 AC 316 ms
269,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

A = list(map(int, input().split())) + [0]

B = list(map(int, input().split())) + [0]

x = 0

ans = 0

for i in range(N + 1):
    
    if A[i] == B[i] and x == 1:
        
        ans += 1
        
        x = 0
        
    elif A[i] != B[i] and x == 0:
        
        ans += 1
        
        x = 1
        
        
print(ans // 2)
0