結果
問題 |
No.1505 Zero-Product Ranges
|
ユーザー |
![]() |
提出日時 | 2021-05-15 00:31:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 190 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-02 07:22:34 |
合計ジャッジ時間 | 2,103 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 31 |
ソースコード
#include <stdio.h> int n,a,i,ans,c; int main(){ scanf("%d",&n); for(;i<n;i++){ scanf("%d",&a); if(a)ans+=c; else{ c=i+1; ans+=c; } } printf("%d\n",ans); }