题目链接
#include<iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
if (a == 0 && b == 0) break;
cout << a + b << endl;
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
if (a == 0 && b == 0) {
break;
}
System.out.println(a + b);
}
}
}
import sys
while True:
s = input().split() # 一行一行读取
a, b = int(s[0]), int(s[1])
if not a or not b: # 遇到 0, 0 则中断
break
print(a + b)
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d %d",&a,&b))
{
if(a==0 && b==0)
break;
printf("%d\n",a+b);
}
return 0;
}