hdu 1000 java代码

来源:互联网 发布:台北房价知多少 编辑:程序博客网 时间:2024/05/30 13:42

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1000

import java.util.Scanner;public class Main{    public static void main(String[] args) {        //Scanner reader = new Scanner(System.in);                Scanner reader=new Scanner(System.in);        int a,b;        while(reader.hasNextInt())        {             a=reader.nextInt();            b=reader.nextInt();            System.out.println(a+b);        }                reader.close();//关闭输入流,关闭所有。    }}


原创粉丝点击