結果
| 問題 | No.1505 Zero-Product Ranges |
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-01-11 19:57:41 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 162,688 KB |
| 最終ジャッジ日時 | 2026-05-10 00:02:14 |
| 合計ジャッジ時間 | 4,251 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_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