ξ ( N ) be function that gives number of digits in N ! in decimal representation.
LetFind the value of ξ ( 1 0 0 0 ) + ξ ( 1 0 0 ) + ξ ( 1 0 ) .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This could have been solved without resorting to programming.
1 2 3 4 5 6 |
|
Seems like everyone is using programming to solve this problem. Is there a more mathematical way to solve this problem without relying on computers?
Using the logarithm of Stirling's formula, an approximation is
ξ n = ⌊ lo g 1 0 lo g 2 π n + n ( lo g n − lo g e ) + 1 ⌋ .
This is correct for most, but not all, values.
MATLAB Code:
f=@(x)floor(1+sum(log10(x)));
answer=f(1:1000)+f(1:100)+f(1:10);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Here is another way to solve it (in Java) -
public static void main(String[] args) throws IOException{
System.out.println(fact((long) 10) + fact((long) 100) + fact((long) 1000));
}
private static long fact(long n) {
double logFacN = 0;
for (long i = 2; i <= n; i++)
logFacN += Math.log10(i);
return (long) logFacN + 1;
}
Python:
1 2 3 4 |
|
Was expecting your python solution @Brock Brown ! Nice sol n !!
ξ ( 1 0 0 0 ) = 2 5 6 8
ξ ( 1 0 0 ) = 1 5 8
ξ ( 1 0 ) = 7
2 5 6 8 + 1 5 8 + 7 = 2 7 3 3
How did you solve @Vaibhav Prasad
Log in to reply
SECRET :D !!!
Log in to reply
Okkk!! :) Secret is secret.
Log in to reply
@Harsh Shrivastava – Harsh try this
https://brilliant.org/problems/go-to-the-floor/?group=QFuwbzryvqgE&ref_id=656258
And also tell me how to add link
Log in to reply
@Vaibhav Prasad – This may help you!
Log in to reply
@Harsh Shrivastava – got it... now try the problem
Log in to reply
@Vaibhav Prasad – Got the answer!!
(Answer is a perfect square!!) @Vaibhav Prasad
Log in to reply
@Harsh Shrivastava – Btw tere exams khatam kya ???
Log in to reply
@Vaibhav Prasad – 20 ko khatam honge! Social padh liya??
Log in to reply
@Harsh Shrivastava – mere bhi 20 ko lekin mere start kal ho rahe hai
social mera ho gya merko sanskrit ka dar hai.........
Log in to reply
@Vaibhav Prasad – Batch formation ke liye kuch padh raha hain kya??
Log in to reply
@Harsh Shrivastava – exams ke baad start karunga
Log in to reply
@Vaibhav Prasad – Chal bye , Kal IT hain, padhne jaa raha hun! Tu aur kitne der brilliant pe rahega ??
Log in to reply
@Harsh Shrivastava – mera bhi IT hai !!
mai bhi thodi der me uth jaunga
Did you solved using python?? @Vaibhav Prasad
Problem Loading...
Note Loading...
Set Loading...
My python code(names of variables are chosen randomly. ) -:
import math
n = 1000
m = 100
k = 10
s = math.factorial(n)
j = math.factorial(m)
k = math.factorial(k)
In = len(str(s))
In1 = len(str(j))
In2 = len(str(k))
print(In + ln1 + ln2)