L1-011 A-B Java 部分解

有两个点不能通过, 给出代码:

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    // 部分解, 有一部分的例子超时了.
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String str2 = br.readLine();
        System.out.print(str.replaceAll("["+str2+"]", ""));
    }
}
原文地址:https://www.cnblogs.com/huangZ-H/p/10066938.html