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

到底是什么错啊??有高手能告诉我吗??谢谢啊

Posted by smilezhen at 2005-08-19 14:16:22 on Problem 1799
#include <iostream.h>
#include <stdio.h>
#include<math.h>

void main(){
	int t, n, i;
	long double R, PI, k;
	PI  = acos(-1);
	cin>>t;
	for(i=1; i<=t;++i){
		cin>>R>>n;
		cout<<"Scenario #"<<i<<":"<<endl;
		k = PI/n;
		k = (sin(k) + sin(PI-k))/2;
		k = k/(1+k);
		if(n==2) printf("%.3llf\n\n",R/2);
		else printf("%.3llf\n\n",R*k);
	}
}

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