ACM a+b代码,要用JAVA写的

2024-11-19 17:21:06
推荐回答(1个)
回答1:

import java.io.*;
import java.util.*;

public class Main
{
public static void main(String args[])
{
Scanner cin = new Scanner(System.in);
int a, b;

while(cin.hasNextInt())
{
a = cin.nextInt();
b = cin.nextInt();
System.out.println(a + b);
}
}
}