|
|
back to boardCrash #3 Why is this code crashing on test #3?! Please give me test 3. My e-mail: muzaffar-17@bk.ru import java.util.HashSet; import java.util.Locale; import java.util.Scanner; import java.util.Set; public class m1718 { public static void main(String[] args) { Locale.setDefault(Locale.US); Scanner sc=new Scanner(System.in); int n=Integer.parseInt(sc.nextLine()); Set<String> set=new HashSet<String>(); String[][] nick=new String[n][10]; int[] d=new int[n]; for (int i = 0; i <n; i++) { nick[i]=sc.nextLine().split(" "); if(nick[i][1].equals("AC")) d[i]=0; else d[i]=Integer.parseInt(nick[i][2]); }int min=0; for (int i = 0; i <n; i++) { if(d[i]==0)set.add(nick[i][0]); if(d[i]>=6)set.add(nick[i][0]); if(d[i]==7)min++; } System.out.println(min+" "+set.size()); } } |
|
|