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 |
奇怪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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator