Source code for submission s1130

Go to diff to previous submission

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;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.  

Diff to submission s1125

Bugs.java

--- c4.s1125.cteam060.bugs.java.0.Bugs.java
+++ c4.s1130.cteam060.bugs.java.0.Bugs.java
@@ -18,5 +18,5 @@
         hledame = sc.next();
 
-        for(j=0;j<i+1;j++){
+        for(j=0;j<i;j++){
            radek = sc.nextLine();
             while(radek.indexOf(hledame)>-1){