Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
请高手指点,为什么错了?/*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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator