結果

問題 No.2401 Dirty Shoes and Stairs
ユーザー 👑 colognecologne
提出日時 2023-08-05 11:53:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,664 KB
実行使用メモリ 111,000 KB
最終ジャッジ日時 2024-04-23 09:02:12
合計ジャッジ時間 3,001 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,828 KB
testcase_01 AC 39 ms
53,528 KB
testcase_02 AC 38 ms
52,272 KB
testcase_03 AC 65 ms
84,572 KB
testcase_04 AC 70 ms
89,544 KB
testcase_05 AC 51 ms
67,952 KB
testcase_06 AC 63 ms
82,420 KB
testcase_07 AC 89 ms
108,040 KB
testcase_08 AC 60 ms
78,760 KB
testcase_09 AC 45 ms
62,540 KB
testcase_10 AC 55 ms
75,008 KB
testcase_11 AC 104 ms
111,000 KB
testcase_12 AC 95 ms
110,012 KB
testcase_13 AC 45 ms
60,592 KB
testcase_14 AC 42 ms
59,844 KB
testcase_15 AC 43 ms
59,772 KB
testcase_16 AC 44 ms
59,276 KB
testcase_17 AC 44 ms
59,536 KB
testcase_18 AC 43 ms
59,428 KB
testcase_19 AC 43 ms
59,444 KB
testcase_20 AC 43 ms
59,408 KB
testcase_21 AC 42 ms
58,680 KB
testcase_22 AC 44 ms
59,748 KB
testcase_23 AC 44 ms
60,432 KB
testcase_24 AC 43 ms
59,192 KB
testcase_25 AC 42 ms
59,348 KB
testcase_26 AC 42 ms
58,296 KB
testcase_27 AC 42 ms
58,548 KB
testcase_28 AC 42 ms
59,644 KB
testcase_29 AC 41 ms
59,668 KB
testcase_30 AC 42 ms
58,584 KB
testcase_31 AC 43 ms
60,260 KB
testcase_32 AC 42 ms
58,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate


def main():
    N = int(input())
    Z = [0]*(N+1)
    input()
    *A, = accumulate(map(int, input().split()))
    input()
    *B, = accumulate(map(int, input().split()))
    for a in A:
        Z[a] = 1
    for b in B:
        Z[N-b] = 1

    print(N+1-sum(Z))


if __name__ == '__main__':
    main()
0