結果
問題 |
No.1505 Zero-Product Ranges
|
ユーザー |
![]() |
提出日時 | 2021-05-15 00:30:23 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 190 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 07:21:36 |
合計ジャッジ時間 | 2,429 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); }