题解 | 多组_A+B_零尾模式
多组_A+B_零尾模式
https://www.nowcoder.com/practice/a561ad77e7bb45679db2bd7317fded84
import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(in.hasNextLine()){
String s = in.nextLine();
String[] arr = s.split(" ");
if(Integer.parseInt(arr[0]) == Integer.parseInt(arr[1]) && Integer.parseInt(arr[1]) == 0){
break;
}
System.out.println(Integer.parseInt(arr[0]) + Integer.parseInt(arr[1]));
}
}
}