[ACM]HDU Problem 1000 + Java

Posted vivianwang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[ACM]HDU Problem 1000 + Java相关的知识,希望对你有一定的参考价值。

//no package name 
//import when necessary
import java.util.Scanner;

//it has to be Main class
public class Main 
	public static void main(String[] args)
		Scanner input = new Scanner(System.in);
		
		//Wrong answer when using while(true)
		while(input.hasNext())
			int a = input.nextInt(), b = input.nextInt();
			System.out.println(a+b);
		
	

  

以上是关于[ACM]HDU Problem 1000 + Java的主要内容,如果未能解决你的问题,请参考以下文章