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

求助,我这个c语言为什么会超时

Posted by davidron at 2008-10-25 22:13:21
/*以下是我对问题2521 How much did the businessman lose 而用c语言写的代码,judge online提示时间错误,请高手指点*/
main()
{int N,M,P,C,j,i=0,t[10];
for(;;)
{
scanf("%d%d%d%d",&N,&M,&P,&C);
if (N==0&&M==0&&P==0&&C==0) break;
t[i]=N-M+P;
i+=1;
}
j=i;
for(i=0;i<j;i++)
printf ("%d\n",t[i]);
}

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