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 |
为什么会WA!!明明数据都是正确的(是我哪里读错题了么……)#include "stdio.h" int main(){ int i,a,b,s=0,count=0,day; while(1){ count=0; scanf("%d",&i); if(i==0)break; else{ day=0; for(;i>0;i--){ day++; scanf("%d%d",&a,&b); if((s<(a+b))&&((a+b)>8)){ count=day; s=a+b; } } } printf("%d\n",count); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator