1 Test case failed
My code is : import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.nextLine(); int d=Integer.parseInt(in.nextLine()); String name=in.nextLine(); in.close(); String names[] = name.split(" "); int k = 0; if(names.length+1<=d) System.out.println("20"); else { for (int i = 0; i < names.length; i++) { if (s.compareTo(names[i]) > 0) k++; } int t = k; int a = 0; if (t % 2 == 0) a = 1; while (t > d) { t = t - d; a++; } if (k < d) System.out.println("20"); else System.out.println((20 + a * 20)); } } } Please help as i could not find where it is failing.