結果

問題 No.1183 コイン遊び
ユーザー lemonlemon
提出日時 2021-05-10 11:40:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 448 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 11,768 KB
実行使用メモリ 37,992 KB
最終ジャッジ日時 2023-10-19 20:13:31
合計ジャッジ時間 17,601 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,036 KB
testcase_01 AC 29 ms
10,036 KB
testcase_02 AC 29 ms
10,036 KB
testcase_03 WA -
testcase_04 AC 30 ms
10,036 KB
testcase_05 WA -
testcase_06 AC 29 ms
10,036 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 61 ms
11,504 KB
testcase_12 AC 369 ms
26,924 KB
testcase_13 WA -
testcase_14 AC 528 ms
35,524 KB
testcase_15 WA -
testcase_16 AC 565 ms
37,936 KB
testcase_17 WA -
testcase_18 AC 566 ms
37,940 KB
testcase_19 WA -
testcase_20 AC 574 ms
37,940 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 519 ms
37,940 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 568 ms
37,940 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 572 ms
37,940 KB
testcase_32 WA -
testcase_33 AC 572 ms
37,936 KB
testcase_34 AC 576 ms
37,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
nsa = lambda: list(stdin.readline().split())
mod = 10 * 7 + 7

n = ni()
A = na()
B = na()

flag = 1
ans = 0



for i in range(n):
    if A[i] == B[i]:
        if flag:
            ans += 1
            flag = 0
    else:
        flag = 1

if flag:
    ans += 1

print(ans)
0