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 <cstdio> int e,a[64],num,max,n,k,num1; int main(){ while(1){ scanf("%d",&e); if(e!=0){ for(int j=1;j<=e;++j){ scanf("%d",&a[j]); max=a[0];num=0; for(int q=1;q<=e-1;++q){ if(a[q]>max){ max=a[q]+1;k=q; } } } printf("%d\n",max); max=0;k=0; }else{ break; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator