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:我说啊,你只用4位小数也别用3.1415啊,后面那位可是9啊,这该有多大误差?这里没有spj e精度的题目多了

Posted by zerotext at 2005-05-14 23:04:19 on Problem 1005
In Reply To:Re:我说啊,你只用4位小数也别用3.1415啊,后面那位可是9啊,这该有多大误差?这里没有spj e精度的题目多了 Posted by:zerotext at 2005-05-14 22:56:27
> 改为3.1415926535898也不对啊?


我快疯了,改为
#include<stdio.h>
#include<math.h>
main()
{int n,j,i;
 double r,a,b,temp,pi;
 pi=acos(-1.0);
 scanf("%d",&n);
 for(i=1;i<=n;)
 {while(scanf("%f%f",&a,&b)==2)
  {if(a>b)
   temp=a;
   else
   temp=b;
   for(j=1;r<temp;j++)
   r=sqrt(50*j*2/pi);
   printf("Property %d: This property will begin eroding in year %d.\n",i,j-1);
   i++;
   break;
   }
 }
 printf("END OF OUTPUT.");
}
还是WA了

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