Untitled
unknown
java
a year ago
491 B
14
Indexable
import java.util.*;
public class Main {
static final long MOD = 1000000007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while (T-- > 0) {
int N = sc.nextInt();
long ans = 1;
for (int i = 0; i < N; i++) {
int d = sc.nextInt();
ans = (ans * d) % MOD;
}
System.out.println(ans);
}
}
}
Editor is loading...
Leave a Comment