I get 1 test case wa. Please help
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int arr[]=new int[24];
int val=0,max=0;
while(n-->0)
{
float temp=s.nextFloat();
int a=(int)temp;
arr[a]++;
if(arr[a]>max)
{
max=arr[a];
val=a;
}
}
if(max==1)
System.out.println(0);
else
System.out.println(val);
}
}