SoftwareBugs.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
/**
*
* @author cteam070
*/
public class SoftwareBugs {
/**
* @param args the command line arguments
*/
Scanner sc
= new Scanner
(System.
in); StringBuilder line;
while (sc.hasNextInt()) {
int t = sc.nextInt();
int len = bug.length();
for (int i = 0; i < t; i++) {
int n = 0;
line = new StringBuilder(br.readLine());
while (true) {
n = line.indexOf(bug, n);
if (n == -1) {
break;
}
line = line.delete(n, n + len);
n = n + 1 > len ? n + 1 - len : 0;
}
}
}
}
}