<!-- @page { margin: 0.79in } PRE.cjk { font-family: "DejaVu Sans", monospace } P { margin-bottom: 0.08in } -->
java
解决acm 中整数的 读取 input: 12 23 34 23 output: 12 23 34 23
import java.io.IOException;
import java.io.InputStreamReader;
public class test{
public static void main(String[] args) throws IOException{
// 创建输入流对象
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// 读取一行信息
String input = reader.readLine();
// 以空格为分隔符,转换成数组
String[] numbers = input.split(" ");
for(int j=0;j<numbers.length;j++)
{
System.out.print(Integer.parseInt(numbers[j]));
}
}
}