Source code for submission s770

Bugs.java

  1. import java.util.*;
  2. import java.util.Scanner;
  3. import java.io.*;
  4.  
  5. public class Bugs {
  6. public static void main(String[] args) throws Exception {
  7. int t,i;
  8. String b;
  9. Scanner sc = new Scanner(System.in);
  10. while (sc.hasNextInt()) {
  11. t = sc.nextInt();
  12. /*System.out.println(t);*/
  13. b = sc.nextLine();
  14. b = b.replace(" ", "");
  15. /*System.out.println(b);*/
  16. for (i = 1; i <= t; i++) {
  17. /*System.out.println("bent");*/
  18. String s = sc.nextLine();
  19. /*System.out.println(s);*/
  20. while (s.contains(b)) {
  21. s = s.replace(b, "");
  22. }
  23. System.out.println(s);
  24. }
  25.  
  26. }
  27. }
  28.  
  29. }
  30.  
  31.