BETA
Maximum number of zeroes
Submissions: 8466   Accuracy:

15.77%

  Difficulty: Basic
     

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
Author: saksham0751


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