Source code for submission s1125

Bugs.java

  1.  
  2. import java.util.Scanner;
  3.  
  4. public class Main {
  5.  
  6. /**
  7.   * @param args the command line arguments
  8.   */
  9. public static void main(String[] args) {
  10.  
  11. Scanner sc = new Scanner(System.in);
  12. String radek="";
  13. String hledame="";
  14.  
  15. int j;
  16. while(sc.hasNext()){
  17. int i = sc.nextInt();
  18. hledame = sc.next();
  19.  
  20. for(j=0;j<i+1;j++){
  21. radek = sc.nextLine();
  22. while(radek.indexOf(hledame)>-1){
  23. radek = radek.replaceAll(hledame,"");
  24. }
  25. System.out.println(radek);
  26. }
  27.  
  28.  
  29. }
  30. }
  31.  
  32. }
  33.