ACM快速输入输出

package 输入输出;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;

public class InOut2 {
	public static void main(String[] args) throws IOException {
		StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		while (in.nextToken() != StreamTokenizer.TT_EOF) {
			int num = (int) in.nval;
			out.println(num);
			out.flush();//刷新  
		}
	}
}

你可能感兴趣的:(ACM,快速输入,快速输出,ACM,输入输出)