Java 关闭流同步输入输出

传送门

import java.util.Scanner;
import java.io.BufferedInputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;

public class Main {

    public static void main(String args[]) {
        Scanner cin = new Scanner(new BufferedInputStream(System.in));
        PrintWriter cout = new PrintWriter(new OutputStreamWriter(System.out));
        int t = cin.nextInt();
        for (int i = 1; i <= t; ++i)
            cout.println(cin.nextBigInteger().multiply(cin.nextBigInteger()));
        cout.flush();
    }
}
posted @ 2021-09-21 23:43  JustinRochester  阅读(94)  评论(0编辑  收藏  举报