You are viewing a single comment's thread. Return to all comments →
public static void main(String[] args) { Scanner scan = new Scanner(System.in); if(!scan.hasNext()) { System.out.print("0"); return; }
String s = scan.nextLine(); String[] items = s.trim().split("[ !,?.\\_'@]+"); if(s == ""){ System.out.println("0"); } else if(s.length() > 400000){ return; } else{ System.out.println(items.length); } for(String item: items){ System.out.println(items); } scan.close();
}
Seems like cookies are disabled on this browser, please enable them to open this website
Database Normalization #5
You are viewing a single comment's thread. Return to all comments →
check this it will pass all test cases
public static void main(String[] args) { Scanner scan = new Scanner(System.in); if(!scan.hasNext()) { System.out.print("0"); return; }
}