int main() {
long long n, q;
cin >> n >> q;
vector<long long>v;
for (long long i = 0; i < n; i++) {
long long num;
cin >> num;
v.push_back(num);
}
vector<long long>ans;
for (long long i = 0; i < q; i++) {
long long l, r;
cin >> l >> r;
l -= 1;
r -= 1;
long long sum = 1;
for (long long index = l; index <= r; index++) {
sum *= v[index];
}
ans.push_back(sum);
}
for (long long i = 0; i < q; i++) {
printf("sum = %lld\n", ans[i]);
printf("sum 取模 6 = %lld\n", ans[i] % 6);
}
}
有没有大佬能够帮我看看我第三题为什么测试通过了,提交通过0%