LENGFACT - Factorial length
Given integer n, print length of n! (which is factorial of n).
The first line of the standard input contains one integer t (t < 10001) which is the number of test cases.
In each of the next t lines there is number n (0 <= n <= 5*10^9).
For each test, print the length of n! (which is factorial of n).
in c, use PI=acos(-1); under math.h :-)
define a variable called pi upto as many digits as possible and then do it. Good formula based problem.
In Python, I used 22/7 for pi and was getting WA. then I used math.pi and got Accepted.
i am getting wrong answer even after getting right answer on ideone for of the cases and i have kamenetskys formula only
Keep 0 in mind
use long long for input type of n, costed few WA!
Simply formula based, AC in 0.02
i use kamenertsky ...my code give correct ans to all testcase of spoj toolkit on ideone but i get WA on spoj.need help??
Pay attention for test case which n is equal to 0.
|Added by:||Piotr Kąkol|
|Cluster:||Cube (Intel G860)|
|Resource:||Copy of the problem: FACTLENG with different assessment|