Bugs.java
import java.io.BufferedReader;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.IOException;
import java.io.InputStreamReader;
class Bugs {
/**
* @param args the command line arguments
*/
while(true){
String firstLine
= br.
readLine(); if(firstLine == null) return;
String [] firstWords
= firstLine.
split(" "); int lineCount
= Integer.
parseInt(firstWords
[0]);
String errorCode
= firstLine.
substring(firstWords
[0].
length() + 1); // System.out.println(errorCode + " " + errorCode.length());
for (int i = 0; i < lineCount; i++) {
while(line.contains(errorCode)){
line = line.replaceAll(errorCode, "");
}
}
}
}
}