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 omycle at 2009-05-05 21:31:35 on Problem 1423 and last updated at 2009-05-05 21:32:42
int(log10(n!) = log10(sqrt(2 * pi * n)) + n * log10(n / e))+1
可以,但
ceil(log10(n!) = log10(sqrt(2 * pi * n)) + n * log10(n / e))
就WRONG answer
后来,我又试了试1,结果是0,所以我就判断了一下,如果是1,那么就直接输出1.但还是WA,
不知道为什么。难道是传说中的RP?
	        cin>>a;
		if(a==1)
		cout<<1<<endl;
		else
		cout<<ceil(log10(sqrt(2*PI*a))+a*log10(a/E))<<endl;


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