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 ACM99999 at 2006-06-06 15:16:16 on Problem 2819
/*Problem Id:2819  User Id:ACM99999 
Memory:96K  Time:0MS
Language:C++  Result:Wrong Answer
参照解体报告解答*/
#include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <cstdio>
using namespace std;
int main()
{
	double n = 10.0;
	char str[255];
	while(scanf("%lf",&n)!=EOF)
	{
		if(n<1) break;
		sprintf(str,"%.20f\n",exp((n-2) * log((n-1)/n)));
		str[16] = '\0';
		printf("%s\n",str);
	}
	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