文章摘要
思路求解代码 private static final int MOD 1000000007;public static void main(String[] args) throws IOException {BufferedReader br new BufferedReader(new InputStreamReader(System.in));PrintWriter out new PrintWriter(new OutputStreamWriter(System.out));in…