結果

問題 No.1505 Zero-Product Ranges
ユーザー harurunharurun
提出日時 2021-05-14 22:42:07
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 120 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 11,808 KB
最終ジャッジ日時 2023-07-25 08:09:13
合計ジャッジ時間 5,691 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,776 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 16 ms
7,900 KB
testcase_03 AC 81 ms
11,724 KB
testcase_04 AC 106 ms
11,724 KB
testcase_05 AC 45 ms
9,416 KB
testcase_06 AC 42 ms
9,396 KB
testcase_07 AC 37 ms
8,912 KB
testcase_08 AC 40 ms
9,204 KB
testcase_09 AC 38 ms
8,972 KB
testcase_10 AC 46 ms
9,052 KB
testcase_11 AC 50 ms
9,396 KB
testcase_12 AC 40 ms
8,924 KB
testcase_13 AC 70 ms
10,204 KB
testcase_14 AC 62 ms
9,912 KB
testcase_15 AC 98 ms
11,316 KB
testcase_16 AC 99 ms
11,768 KB
testcase_17 AC 98 ms
11,724 KB
testcase_18 AC 100 ms
11,808 KB
testcase_19 AC 16 ms
7,888 KB
testcase_20 AC 17 ms
7,768 KB
testcase_21 AC 16 ms
7,784 KB
testcase_22 AC 95 ms
11,140 KB
testcase_23 AC 96 ms
11,368 KB
testcase_24 AC 94 ms
11,316 KB
testcase_25 AC 91 ms
11,184 KB
testcase_26 AC 93 ms
11,344 KB
testcase_27 AC 93 ms
11,316 KB
testcase_28 AC 92 ms
11,300 KB
testcase_29 AC 94 ms
11,376 KB
testcase_30 AC 96 ms
11,748 KB
testcase_31 AC 94 ms
11,252 KB
testcase_32 AC 56 ms
9,936 KB
testcase_33 AC 55 ms
9,772 KB
testcase_34 AC 59 ms
10,000 KB
testcase_35 AC 49 ms
9,328 KB
testcase_36 AC 50 ms
9,676 KB
testcase_37 AC 58 ms
9,976 KB
testcase_38 AC 54 ms
9,772 KB
testcase_39 AC 53 ms
9,808 KB
testcase_40 AC 58 ms
9,840 KB
testcase_41 AC 62 ms
10,120 KB
testcase_42 AC 21 ms
8,320 KB
testcase_43 AC 23 ms
8,216 KB
testcase_44 AC 22 ms
8,276 KB
testcase_45 AC 23 ms
8,144 KB
testcase_46 AC 20 ms
8,140 KB
testcase_47 AC 24 ms
8,256 KB
testcase_48 AC 20 ms
8,296 KB
testcase_49 AC 18 ms
8,208 KB
testcase_50 AC 21 ms
8,288 KB
testcase_51 AC 22 ms
8,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*a=map(int,open(0).read().split())
c=b=0
for i in range(n):
  if a[i]:
    b+=c
  else:
    c=i+1
    b+=i+1
print(b)
0