[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);
		}
	}
}

  

猜你喜欢

转载自www.cnblogs.com/Vivianwang/p/10968583.html