Main.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package bugs;
import java.io.IOException;
import java.util.Scanner;
/**
*
* @author cteam064
*/
public class Main {
byte[]array = new byte[1];
char c;
try{
c = (char) array[0];
return c;
}
return 0;
}
}
Scanner scanner
= new Scanner
(System.
in); int lines;
int j = 0;
while (scanner.hasNext()){
lines = scanner.nextInt();
delimiter = scanner.next();
for (int i = 0; i < lines;i++){
char c = readChar();
while(c != '\n'){
if (delimiter.charAt(0) == c){
buffer += c;
while(c != '\n'){
c = readChar();
buffer += c;
while (buffer.contains(delimiter)){
buffer = buffer.replaceAll(delimiter, "");
}
if (buffer.isEmpty()){
break;
}
}
}
else{
}
c = readChar();
}
}
}
}
}