結果

問題 No.1505 Zero-Product Ranges
ユーザー ireenaireena
提出日時 2022-02-21 10:53:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 104,020 KB
最終ジャッジ日時 2023-09-12 01:55:07
合計ジャッジ時間 8,302 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,292 KB
testcase_01 AC 73 ms
71,360 KB
testcase_02 AC 73 ms
71,456 KB
testcase_03 AC 106 ms
104,020 KB
testcase_04 AC 141 ms
92,008 KB
testcase_05 AC 87 ms
80,832 KB
testcase_06 AC 86 ms
80,864 KB
testcase_07 AC 83 ms
79,356 KB
testcase_08 AC 84 ms
79,852 KB
testcase_09 AC 85 ms
79,284 KB
testcase_10 AC 93 ms
75,520 KB
testcase_11 AC 103 ms
78,644 KB
testcase_12 AC 90 ms
74,276 KB
testcase_13 AC 117 ms
83,772 KB
testcase_14 AC 110 ms
81,988 KB
testcase_15 AC 138 ms
92,052 KB
testcase_16 AC 142 ms
97,580 KB
testcase_17 AC 141 ms
97,888 KB
testcase_18 AC 141 ms
97,916 KB
testcase_19 AC 72 ms
71,232 KB
testcase_20 AC 72 ms
71,420 KB
testcase_21 AC 73 ms
71,476 KB
testcase_22 AC 140 ms
97,348 KB
testcase_23 AC 141 ms
97,364 KB
testcase_24 AC 138 ms
97,184 KB
testcase_25 AC 141 ms
95,300 KB
testcase_26 AC 138 ms
97,156 KB
testcase_27 AC 137 ms
95,364 KB
testcase_28 AC 134 ms
95,532 KB
testcase_29 AC 141 ms
97,528 KB
testcase_30 AC 142 ms
97,748 KB
testcase_31 AC 138 ms
97,240 KB
testcase_32 AC 112 ms
86,696 KB
testcase_33 AC 113 ms
86,200 KB
testcase_34 AC 114 ms
87,960 KB
testcase_35 AC 109 ms
84,592 KB
testcase_36 AC 111 ms
85,328 KB
testcase_37 AC 120 ms
86,932 KB
testcase_38 AC 111 ms
86,348 KB
testcase_39 AC 113 ms
86,420 KB
testcase_40 AC 112 ms
86,492 KB
testcase_41 AC 117 ms
88,240 KB
testcase_42 AC 86 ms
76,548 KB
testcase_43 AC 89 ms
76,672 KB
testcase_44 AC 85 ms
76,644 KB
testcase_45 AC 86 ms
76,704 KB
testcase_46 AC 84 ms
76,328 KB
testcase_47 AC 87 ms
76,976 KB
testcase_48 AC 84 ms
76,644 KB
testcase_49 AC 81 ms
76,360 KB
testcase_50 AC 85 ms
76,588 KB
testcase_51 AC 85 ms
76,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import groupby;N = int(input());print(N*(N+1)//2 - sum([(l:=len([*g]))*(l+1)//2 for v, g in groupby(map(int, input().split())) if v == 1]))
0