結果

問題 No.1505 Zero-Product Ranges
ユーザー convexineqconvexineq
提出日時 2021-05-14 22:23:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 162 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 107,980 KB
最終ジャッジ日時 2024-04-10 00:53:10
合計ジャッジ時間 4,879 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,616 KB
testcase_01 AC 37 ms
52,488 KB
testcase_02 AC 37 ms
52,016 KB
testcase_03 AC 81 ms
104,108 KB
testcase_04 AC 78 ms
104,124 KB
testcase_05 AC 59 ms
79,004 KB
testcase_06 AC 55 ms
78,188 KB
testcase_07 AC 56 ms
75,076 KB
testcase_08 AC 54 ms
76,052 KB
testcase_09 AC 52 ms
74,316 KB
testcase_10 AC 53 ms
75,208 KB
testcase_11 AC 54 ms
77,432 KB
testcase_12 AC 49 ms
72,696 KB
testcase_13 AC 67 ms
88,052 KB
testcase_14 AC 63 ms
85,372 KB
testcase_15 AC 78 ms
103,464 KB
testcase_16 AC 88 ms
107,184 KB
testcase_17 AC 86 ms
106,932 KB
testcase_18 AC 90 ms
107,980 KB
testcase_19 AC 34 ms
52,692 KB
testcase_20 AC 34 ms
52,064 KB
testcase_21 AC 35 ms
52,068 KB
testcase_22 AC 85 ms
106,304 KB
testcase_23 AC 86 ms
106,844 KB
testcase_24 AC 84 ms
106,608 KB
testcase_25 AC 84 ms
102,464 KB
testcase_26 AC 84 ms
105,132 KB
testcase_27 AC 83 ms
102,576 KB
testcase_28 AC 85 ms
102,648 KB
testcase_29 AC 87 ms
106,444 KB
testcase_30 AC 87 ms
106,752 KB
testcase_31 AC 85 ms
105,344 KB
testcase_32 AC 63 ms
84,708 KB
testcase_33 AC 63 ms
84,680 KB
testcase_34 AC 64 ms
88,304 KB
testcase_35 AC 60 ms
80,020 KB
testcase_36 AC 60 ms
83,212 KB
testcase_37 AC 66 ms
84,636 KB
testcase_38 AC 62 ms
83,856 KB
testcase_39 AC 63 ms
83,424 KB
testcase_40 AC 61 ms
83,744 KB
testcase_41 AC 65 ms
85,688 KB
testcase_42 AC 47 ms
65,272 KB
testcase_43 AC 46 ms
65,168 KB
testcase_44 AC 44 ms
65,144 KB
testcase_45 AC 44 ms
65,432 KB
testcase_46 AC 48 ms
64,760 KB
testcase_47 AC 46 ms
65,336 KB
testcase_48 AC 45 ms
64,828 KB
testcase_49 AC 43 ms
62,968 KB
testcase_50 AC 43 ms
64,512 KB
testcase_51 AC 43 ms
65,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*a = map(int,open(0).read().split())
ans = cnt = r = 0
for l in range(n):
    if r < l: r = l
    while r < n and a[r]:
        r += 1
    ans += n-r
print(ans)
0