Suppose there are x ways to arrange the elements of 9 9 element set. Find the number of digits of x
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.
@Ashish Siva How do you know P ( 9 9 ) has 1 5 6 digits?
Log in to reply
I found the answer and put it in th place where i have to submit the answer. It allows only 33 digits and it shows that it has 156 digits, so i got the answer :P
Log in to reply
I was asking for a general method.
Log in to reply
@Rushikesh Jogdand – If not what i did was i grouped in channels of 3 and counted the no. of groups and multiplied it with 3.
Log in to reply
@Ashish Menon – Please explain.
Log in to reply
@Rushikesh Jogdand – It is easier to count 3 numbers at a time than to count 1 number at a time. For example in the number 123456, it is difficult to count one by one that there are 6 digits but if 1 group them into 3 numbers like 123|456, then it is easier to count, there are 2 groups . So, the number of digits are 2×3=6. Do the same thing for the answer
Log in to reply
@Ashish Menon – But how to calculate 9 9 !
Log in to reply
@Rushikesh Jogdand
–
1) Create an array ‘res[]’ of MAX size where MAX is number of maximum digits in output.
2) Initialize value stored in ‘res[]’ as 1 and initialize ‘res
size’ (size of ‘res[]’) as 1.
3) Do following for all numbers from x = 2 to n.
……a) Multiply x with res[] and update res[] and res
size to store the multiplication result.
Now, how to multiply (res[],x)
1) Initialize carry as 0.
2) Do following for i = 0 to res
size – 1.
….a) Find value of res[i] * x + carry. Let this value be prod.
….b) Update res[i] by storing last digit of prod in it.
….c) Update carry by storing remaining digits in carry.
3) Put all digits of carry in res[] and increase res
size by number of digits in carry.
If you still dont understand, i can give you an example.
Log in to reply
@Ashish Menon – Although I didn't understand it, here's what I did
We have to find number of digits in 9 9 ! (in base 1 0 , of-course)
So, we've to find out answer to lo g 1 0 9 9 ! + 1
lo g 1 0 9 9 ! = lo g 1 0 ( 1 × 2 × 3 × ⋯ × 9 9 ) = lo g 1 0 1 + lo g 1 0 2 + lo g 1 0 3 + ⋯ + lo g 1 0 9 9
Any good calculator can find this
I would like to know what you did in details.
Problem Loading...
Note Loading...
Set Loading...
The answer is P ( 9 9 ) which has 1 5 6 digits.