This is a functional problem . Your task is to return the product of array elements under a given modulo.

The **modulo operation** finds the remainder after division of one number by another. For example, K(mod(m))=K%m= remainder obtained when K is divided by m.

**Input:**

The first line of input contains T denoting the number of testcases.Then each of the T lines contains a single positive integer N denotes number of element in array. Next line contain 'N' integer elements of the array.

**Output:**

Return the product of array elements under a given modulo.

That is, return (Array[0]*Array[1]*Array[2]...*Array[n])%modulo.

**Constraints:**

1<=T<=200

1<=N<=10^5

1<=ar[i]<=10^5

**Example:**

**Input:**

1

4

1 2 3 4

**Output:**

24

mohamadhegazy97 | 57 |

ManojBharadhwaj | 49 |

bhatabhi554 | 48 |

adityak12 | 48 |

RaghavJindal | 47 |

blackshadows | 940 |

SunkyuHwang | 794 |

bently_nixon | 701 |

mb1973 | 491 |

Shaurya Khanna | 491 |

akhayrutdinov | 5043 |

Ibrahim Nash | 4967 |

blackshadows | 4640 |

Quandray | 4354 |

sanjay05 | 3668 |

Login to report an issue on this page.