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:哪 位牛人可以帮帮小弟看一看是什么错误啊总是WA,十分感激!!!!!In Reply To:哪 位牛人可以帮帮小弟看一看是什么错误啊总是WA,十分感激!!!!! Posted by:wo_top at 2007-11-25 20:16:44 > #include<stdio.h> > #include<malloc.h> > void main() > { unsigned long j,*day; > int i=0,n; > scanf("%d",&n); > day=(unsigned long*)malloc(n*sizeof(unsigned long)); > while(i<n) > { scanf("%ld",&day[i]); > for(j=1;day[i]>j;j++) > { day[i]-=j; > } > > //printf("%ld\n",day[i]); > i++; > } > for(i=0;i<n;i++) > printf("%lu\n",day[i]); > //free(day); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator