結果
| 問題 | No.1505 Zero-Product Ranges |
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-01-11 19:57:41 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 1,667 ms |
| コンパイル使用メモリ | 82,872 KB |
| 実行使用メモリ | 111,712 KB |
| 最終ジャッジ日時 | 2026-09-22 09:41:33 |
| 合計ジャッジ時間 | 7,936 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | TLE * 1 -- * 48 |
ソースコード
from collections import defaultdict
n=int(input())
ns=list(map(int,input().split()))
ans=0
for i in range(n):
dic= defaultdict(int)
dic[ns[i]] += 1
if ns[i] == 0:
ans += n-i
print(n-i)
continue
for j in range(i,n):
dic[ns[j]] += 1
if dic[0] > 0:
ans+=1
print(ans)
lllllll88938494