結果
| 問題 | No.1505 Zero-Product Ranges |
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-14 22:23:46 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 162 bytes |
| 記録 | |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 107,648 KB |
| 最終ジャッジ日時 | 2026-04-18 11:08:48 |
| 合計ジャッジ時間 | 4,303 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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