結果

問題 No.1183 コイン遊び
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-10-19 09:05:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 591 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 81,596 KB
実行使用メモリ 275,332 KB
最終ジャッジ日時 2023-10-20 10:38:47
合計ジャッジ時間 13,413 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,348 KB
testcase_01 AC 37 ms
53,348 KB
testcase_02 AC 37 ms
53,348 KB
testcase_03 AC 38 ms
53,348 KB
testcase_04 AC 37 ms
53,348 KB
testcase_05 AC 38 ms
53,348 KB
testcase_06 AC 37 ms
53,348 KB
testcase_07 AC 37 ms
53,348 KB
testcase_08 AC 40 ms
59,348 KB
testcase_09 AC 40 ms
59,348 KB
testcase_10 AC 47 ms
67,128 KB
testcase_11 AC 61 ms
83,664 KB
testcase_12 AC 292 ms
194,836 KB
testcase_13 AC 457 ms
189,660 KB
testcase_14 AC 411 ms
243,284 KB
testcase_15 AC 591 ms
274,380 KB
testcase_16 AC 350 ms
274,960 KB
testcase_17 AC 359 ms
275,032 KB
testcase_18 AC 344 ms
275,280 KB
testcase_19 AC 349 ms
275,276 KB
testcase_20 AC 348 ms
275,284 KB
testcase_21 AC 335 ms
275,256 KB
testcase_22 AC 336 ms
275,252 KB
testcase_23 AC 338 ms
275,256 KB
testcase_24 AC 335 ms
275,252 KB
testcase_25 AC 345 ms
275,280 KB
testcase_26 AC 345 ms
275,276 KB
testcase_27 AC 347 ms
275,280 KB
testcase_28 AC 348 ms
275,280 KB
testcase_29 AC 338 ms
275,252 KB
testcase_30 AC 340 ms
275,264 KB
testcase_31 AC 346 ms
275,280 KB
testcase_32 AC 347 ms
275,280 KB
testcase_33 AC 349 ms
275,332 KB
testcase_34 AC 350 ms
275,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
on = 0
for i in range(n):
    if A[i] == B[i]:
        if on == 1:
            ans += 1
            on = 0
    else:
        on = 1
if on == 1:
    ans += 1
print(ans)
0