Anybody please explain the question. I wrote code but it fails the testcases and passes the base cases.

this is my code. I think i misunderstood the question. please explain me the question. thanks in advance.

```
#include <stdio.h>
long int mult(int arr[],long int l,long int r,long int m);
int main(void) {
// your code goes here
long int n,t,l,r,m;
scanf("%ld",&n);
int arr[n];
for(int i=0;i<n;i++){
scanf("%d",&arr[i]);
}
scanf("%ld",&t);
while(t--){
scanf("%ld%ld%ld",&l,&r,&m);
long int ans= mult(arr,l,r,m);
printf("%ld\n",ans);
}
return 0;
}
long int mult(int arr[],long int l,long int r,long int m)
{
long int res=1;
for(long int i=l-1;i<r;i++){
res=res*arr[i];
}
return res%m;
}
```