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

输出有问题!另外结果应该去尾(符合实际情况),%.0f是四舍五入的!

Posted by mja at 2005-12-27 17:49:51 on Problem 2707
In Reply To:大家帮我看看我这个程序哪儿错了 Posted by:lnmm at 2005-12-11 00:53:51
> #include"stdio.h"
> void main()
> {
>  float a,b,c,d,t,x,y,z;
> scanf("%f%f%f%f",&a,&b,&c,&d);
> while(a!=0)
> {
> if(a<b){t=a;a=b;b=t;}
> if(c<d){t=c;c=d;d=t;}
> x=c/a;
> y=d/b;
> if(x<y)z=x;else z=y;
> if(z>=1)z=1;
> printf("%.0f\n",z*100);printf("%");
> scanf("%f%f%f%f",&a,&b,&c,&d);
> }
> }
> 
> 怎么总是wrong answer呢?
> 我在本机都通过了啊
> 请指教,谢谢

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