| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
其实还能更简洁的。。。#include<stdio.h>
int main()
{
int n,a,b,tick,i,uh;
while(tick=0,uh=0,scanf("%d",&n)&&n!=0)
{
for(i=0;i<n;i++)
{
scanf("%d %d",&a,&b);
a+=b;
if(a>uh&&a>8) {uh=a;tick=i+1;}
}
printf("%d\n",tick);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator