5465 - GESP:2024-6月等级7-T2-区间乘积
Time Limit : 1 秒
Memory Limit : 128 MB
Input
第一行包含一个正整数n ,代表正整数个数。 第二行包含n 个正整数 a1,a2...an,代表序列A 。
Output
输出一个整数,代表满足要求的<l,r> 数量
Examples
Input
5 3 2 4 3 2
Output
2
Hint
样例解释
满足条件的<l,r> 有<3,3> 和<1,5> 。
1<=n<=10^5,1<=ai<=30