Source code for submission s896

Bugs.java

  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3.  
  4. public class Bugs {
  5. public static void main(String[] args) throws Exception {
  6. String str;
  7. String[] radek;
  8. String pred;
  9. String po;
  10. int n;
  11. while((str = br.readLine()) != null){
  12. radek = str.split(" ");
  13. n = Integer.parseInt(radek[0]);
  14. for (int i = 0; i < n; i++)
  15. {
  16. po = br.readLine();
  17. do
  18. {
  19. pred = new String(po);
  20. po = po.replace(radek[1], "");
  21. } while(pred.hashCode() != po.hashCode());
  22. System.out.println(po);
  23. }
  24. }
  25.  
  26.  
  27. }
  28. }
  29.