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 |
Re:那位老兄帮忙看一下,为什么wrong answerIn Reply To:那位老兄帮忙看一下,为什么wrong answer Posted by:acmpku at 2005-01-06 20:48:28 > #include<stdio.h> > void main() > { > char a[1000][10]; > int i,k,t=0,m,n,b[1000],c[1000]; > for(i=0;i<1000;i++) > { > scanf("%s\n",a[i]); > if(a[i][0]=='#') > break; > scanf("%d %d",&b[i],&c[i]); > } > scanf("%d\n",&k); > for(m=1;;m++) > { > for(n=0;n<i;n++) > { > if(m%c[n]==0) > { > printf("%d\n",b[n]); > t++; > } > if(t==k) > break; > } > if(t==k) > break; > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator