I divided 50 by 2 continuously and got 47 to be my answer. What did I do wrong?
Well,what’s the logic behind doing that?
You need to break the denominator into its primes and 2 is the only prime.
do they ask legendres formula in gre ?
so in legendres formula which is basically Largest exponent of p in n! = Sum of (floor(n/(pi))
so in this case where p is a prime so we can now treat it like 50! / (2^2x) so think of it like a counting problem
so lets take for example for simplicity 10! and then when we take that
the 10! can have 10 , 8 , 6 , 4 , 2 and all these are multiples of 2
so [10/2] = 5 but we forgot to count twice for 4 and thrice for 8 so what we do is
[10/4] = 2 , [10/8] = 1 hence 8
so doing the same thing for 50! we get 47
so 2x <= 47 since we want the exponent for 4
we get around 23
