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).
Google Kamenetsky's formula
use Kamenetsky’s formula .
How in the name of hamburgers is someone supposed to come up with this on his own????!
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
|Added by:||Piotr Kąkol|
|Cluster:||Cube (Intel G860)|
|Resource:||Copy of the problem: FACTLENG with different assessment|