結果
| 問題 |
No.1505 Zero-Product Ranges
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-14 22:23:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 162 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 82,228 KB |
| 実行使用メモリ | 107,392 KB |
| 最終ジャッジ日時 | 2024-10-02 01:59:12 |
| 合計ジャッジ時間 | 5,241 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 49 |
ソースコード
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)
convexineq