LENGFACT  Factorial length
Given integer n, print length of n! (which is factorial of n).
Input
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).
Output
For each test, print the length of n! (which is factorial of n).
Example
Input:
3
1
10
100
Output:
1
7
158
hide comments
SangKuan:
20150627 06:00:46
wtf...use log10 get wa,and use log,get ac. 

Dushyant Singh:
20150528 20:55:38
Normal length formula to get TLE. Stirling to get AC. 

Akshit Johry:
20150528 20:12:00
any other method other than kamenetsky ?


Lehar:
20150326 07:34:43
Kamenetsky :D 

Vaporeon:
20150309 14:58:24
apply maths except for n==1n==0 :D 

Dushyant Singh:
20150303 10:42:42
Last edit: 20150303 10:45:25 

swyam prakash singh:
20150117 00:11:23
a good problem on concentration 

amit kamboj:
20130202 17:16:39
take care about n = 0 and n = 1 
Added by:  Piotr KÄ…kol 
Date:  20100119 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Copy of the problem: FACTLENG with different assessment 
Problem's scores 1 vote
Concept difficulty
Implementation difficulty
26
15