Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

哪 位牛人可以帮帮小弟看一看是什么错误啊总是WA,十分感激!!!!!

Posted by wo_top at 2007-11-25 20:16:44 on Problem 1019
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator