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> void main() { int n,i,j,c,b[1000],l,k,d[1000]; char a[20],t[20]; i=0; while(scanf("%s%s%d",a,t,&k)!=EOF) { scanf("%d%d",&n,&l); for(d[i]=0,j=0;j<n;j++) { scanf("%d",&b[j]); if(b[j]%l!=0) c=l-b[j]%l; else c=0; if(c>d[i]) d[i]=c; } i++; } for(j=0;j<i;j++) { printf("Sample Output %d\n",j+1); printf("%d\n",d[j]); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator