#include<stdio.h>
int main()
{
int n;
while (scanf("%d", &n) && n != 0)
{
int a, b, sum, max = 0;
while (n--)
{
scanf("%d%d", &a, &b);
sum = a + b;
if (sum>max)
max = sum;
}
printf("%d\n", max);
}
return 0;
}
#include<stdio.h>
int main()
{
int n;
while (scanf("%d", &n) && n != 0)
{
int a, b, sum, max = 0;
while (n--)
{
scanf("%d%d", &a, &b);
sum = a + b;
if (sum>max)
max = sum;
}
printf("%d\n", max);
}
return 0;
}
转载于:https://www.cnblogs.com/minTTremor/p/9101582.html