結果
| 問題 |
No.1505 Zero-Product Ranges
|
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2021-05-15 00:35:02 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 201 bytes |
| コンパイル時間 | 113 ms |
| コンパイル使用メモリ | 28,032 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 07:26:16 |
| 合計ジャッジ時間 | 1,978 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 31 |
ソースコード
#include <stdio.h>
int n,a,i,c;
long long ans;
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);
}
harurun