Page 1 of 1

### 11415 - Count the Factorials

Posted: Fri Aug 15, 2008 5:43 am
I am continuous getting TLE!!
any one can give me good algo i can not found a faster algo
my algo
1. generate prime factor
2. linear search and count

if any good idea?

thanks

nikson

### 11415

Posted: Fri Aug 15, 2008 10:08 pm
i am strange no one can give me any idea.

but i get now ACC.

thanks

### Re: 11415 - Count the Factorials

Posted: Fri Sep 19, 2008 9:11 pm
Why WA???

Code: Select all

``````Cut after AC
``````

### Re: 11415 - Count the Factorials

Posted: Tue Nov 18, 2008 11:34 am
What is the answer for n = 10000000? My WA program prints 3203899.

### Re: 11415 - Count the Factorials

Posted: Tue Nov 18, 2008 3:53 pm
Abednego wrote:What is the answer for n = 10000000? My WA program prints 3203899.
My AC code gives

Code: Select all

``2703663``

### Re: 11415 - Count the Factorials

Posted: Tue Nov 18, 2008 7:03 pm
Thanks, helloneo.
I'm confused though. Does anyone understand what the problem statement means by "1 is a prime". When do we count 1? How many times do we count 1?

Edit: Nevermind. I'm dumb. Fixed.

### Re: 11415 - Count the Factorials

Posted: Mon Jan 26, 2009 9:03 pm
I am getting TLE in this problem. please anybody help me...
here is my code :

Code: Select all

``````removed....
``````
Thanks in advance.

### Re: 11415 - Count the Factorials

Posted: Sun Feb 01, 2009 8:26 pm
your sieve & process funtion take more time
think modified sive

### Re: 11415 - Count the Factorials

Posted: Tue Feb 03, 2009 9:12 pm
Thanks for ur reply MRH.
i am just modifying the sieve. but how can i make the process function more fast. please give me a little hints.

Thanks in advance.

### Re: 11415 - Count the Factorials

Posted: Wed Feb 04, 2009 6:07 pm
HI "lazyboy"
modified sive means your process funtion no need
this task can possible with sive

I hope now u can get ACC
it is enough hints
thanks in advance

### Re: 11415 - Count the Factorials

Posted: Wed Feb 04, 2009 8:24 pm
Thanks MRH.

### Re: 11415 - Count the Factorials

Posted: Sun Jul 10, 2011 4:07 am
Hi,
to solve this problem u need a clever way to generate the number of factors of factorial -( solve the problem 884)-
for each number in the range 1 -> 10 000 000 ... maybe the Algorithm used in the problem 884 isn't enough for this problem.... but it will help you to of course.
then it's easy to find a way to pre-compute the desired results using dp. (Searching for each input will give TLE).
Ahmad