#include <stdio.h>
int main()
{
while(1)
{
int i, n;
int maxday, maxvalue = -1;
scanf("%d", &n);
if (n == 0) break;
for (i = 1; i <= n; i++)
{
int a, b;
scanf("%d%d", &a, &b);
if (a + b > maxvalue)
{
maxvalue = a + b;
maxday = i;
}
}
if (maxvalue <= 8) printf("0\n");
else printf("%d\n", maxday);
}
return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-05 09:22:15