BETA

Difficulty Level:

Basic

Total Submissions: 5193 Accuracy:

13.04%

Maximum number of zeroes
     

Given an array of n values. Print a number which had maximum number of zeroes. If their are no zeroes then print -1.

Note: If there are multiple numbers with same (max) number of zeroes then print the Maximum number among them.

Input:
The first line of input contains an integer T denoting the number of test cases. The first line of each test case consists of an integer n. The next line consists of n spaced integers.

Output:
Print the number with maximum number of zeroes.

Constraints: 
1<=T<=100
1<=N<=1000
1<=A[i]<=100000

Example:
Input:

1
5
10 20 3000 9999 200
Output:
3000

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.