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

Re:为什么我在机上运行没错,但提交就显示WRONG ANSWER呢,帮我看看好吗,谢谢!

Posted by ykstars at 2005-03-29 16:06:49 on Problem 1922
In Reply To:为什么我在机上运行没错,但提交就显示WRONG ANSWER呢,帮我看看好吗,谢谢! Posted by:90401412 at 2005-01-09 15:46:06
> #include <stdio.h>
> #include <math.h>
> #include <stdlib.h>
> void main() {
> 	int i,n,v,t,time;
> 	float *p;
> 	scanf ("%d",&n);
> 	while (n!=0) {
>           p=(float*)malloc(n*sizeof(float));
> 	      for (i=0;i<n;i=i+1) {
> 		      scanf ("%d%d",&v,&t);
> 		      p[i]=(float)(4.5*3600/v+t);
> 		      if ((int)(p[i]*10)%10>0) p[i]=p[i]+1;
> 		  }
> 	      time=(int)p[0];
> 	      for (i=1;i<n;i=i+1) {
> 		      if (p[i]<p[i-1]) time=(int)p[i];
> 		  }
> 	      printf("%d\n",time);
> 	      scanf ("%d",&n);
> 		  }
> }

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