bugs.java
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
*
* @author cteam049
*/
public class bugs {
/**
* @param args the command line arguments
*/
public static void main
(String[] args
) {
bugs program = new bugs();
program.run();
}
protected void run()
{
try
{
for ( ;; )
{
int lines = this.nextInt();
String replacement
= this.
nextToken(); // String tmp = this.nextLine();
int oldLen;
for ( int i = 0; i < lines; i++ )
{
line = this.nextLine();
do
{
oldLen = line.length();
line = line.replace( replacement, "" );
} while( oldLen != line.length() );
}
}
{
e.printStackTrace();
}
}
/* INPUT READING */
{
while ( ! st.hasMoreTokens() )
{
}
return st.nextToken();
}
{
return Integer.
parseInt( this.
nextToken() ); }
{
return input.readLine();
}
}