Source code for submission s1382

Go to diff to previous submission

Butg.java

  1. import java.util.Scanner;
  2. import java.io.BufferedReader;
  3. import java.io.InputStreamReader;
  4. import java.lang.*;
  5. import java.io.IOException;
  6.  
  7. class Butg{
  8.  
  9. public static void main (String []args){
  10.  
  11. Scanner sc = new Scanner(new InputStreamReader(System.in));
  12.  
  13. int numberOfLines = 0;
  14. String regex = "";
  15. String pattern = "";
  16. while(sc.hasNext()){
  17.  
  18. numberOfLines = sc.nextInt();
  19. regex = sc.next();
  20.  
  21. for(int i = 0; i < numberOfLines; i++){
  22.  
  23. pattern = sc.nextLine();
  24. pattern = pattern.replaceAll(regex, "");
  25. System.out.println(pattern);
  26.  
  27. }
  28.  
  29. }
  30.  
  31.  
  32.  
  33. }
  34.  
  35.  
  36. }
  37.  

Diff to submission s1129

Butg.java

--- c4.s1129.cteam107.bugs.java.0.Butg.java
+++ c4.s1382.cteam107.bugs.java.0.Butg.java
@@ -7,5 +7,5 @@
 class Butg{
 
-        public static void main (String []args) throws IOException{
+        public static void main (String []args){
 
                 Scanner sc = new Scanner(new InputStreamReader(System.in));