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 Julylhh at 2009-07-14 17:50:09 on Problem 1799
#include<stdio.h>
#include<math.h>
int main()
{ 
	int t,i;
	int m=1;
	scanf("%d",&t);
	for(i=0;i<t;i++)
	{ 
		float R,n,r;
		scanf("%f%f",&R,&n);
		if(n==1)
			break;
		if(n==2)
		{
			r=R/2.0;
			printf("Scenario #%d:\n",m);
			printf("%.3f\n\n",r);
			
		}   
		if(n>2)
		{ 
			float pi=acos(-1.0);
			float x,y;
			x=cos(2.0*pi/n);
			y=sqrt(2.0/(1-x));
			r=R/(1.0+y);
			printf("Scenario #%d:\n",m);
			printf("%.3f",r);
		}
		if(m<t)
			printf("\n\n");
		m++;
	}
	return 0;	
}

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