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+"]", ""));
    }
}

 

posted @ 2018-12-04 21:16  HHZZHH  阅读(552)  评论(0编辑  收藏  举报