Page 1 of 2

### What is ur minimum time to generate prime in 20000000 ?

Posted: Sun Feb 27, 2005 8:59 am
Hi
There are lot of prime problem's in this site. But my questain is only prime generation. Because most of the good programmer's are use other technick to solve this type of problem's. I want to know what is the minimum time to generate prime in 20000000(only marked this are the prime) ?

U can mesure ur time by using uva submit script. I have known my prime generation time by this way. I have submit only my prime generation code
and my problem was 10394. To mesure my time i have used only prime
generation code not the problem's solution.

I want to know who take the minimum time to generate prime in 20000000.

what ever ur time ? please mention it if u have enough time.

MAP

Posted: Sun Feb 27, 2005 10:54 am
Mohiul, Maybe it would be better if you mentioned your prime generation time.

Posted: Sun Feb 27, 2005 11:16 am
shamim vi
my prime generation time is 1.523 for 20000000.
But u don't mention ur time.

MAP

### faster

Posted: Sun Feb 27, 2005 2:01 pm
My prime generation time is slightly quicker..
.. it takes 1.482 seconds for 20000000.

Posted: Sun Feb 27, 2005 2:25 pm
Hi
I don't want any type of prove of ur algorithm, but I belive u will mention ur proper time.

MAP

Posted: Sun Feb 27, 2005 2:47 pm
Hi Mohiul.

Why r u so sure that the time of sohel is not real .

Posted: Sun Feb 27, 2005 2:54 pm
Hi
what is ur time please tell ?
I don't mean that sohel's time is worng(Sohel is my class mate so I know his ability he has solve about 860 problem's in uva) only i want to know the time.
I hope u will mention ur time.

MAP

Posted: Sun Feb 27, 2005 3:03 pm
Sorry mohiul.

Sohel told you his time, but u didnot belive it and told him for real one.
Now if i tell u my time then u may also not belive my time. So....

Posted: Sun Feb 27, 2005 3:07 pm
Better u talk about your algorithm(method) then to say my time is 0.0somthing
If one say false time, you can not prevent him/her because you don't know every one personally!!

Posted: Sun Feb 27, 2005 3:25 pm
Hi
A1 and Kamanashish forget every thing.
i want to know who is the good prime generator and what is his time that
i can understand my real position in prime generation.

MAP

Posted: Sun Feb 27, 2005 3:38 pm
HI
Is this possible to generate prime in 20000000 below .200 second.

MAP

Posted: Sun Feb 27, 2005 3:40 pm
ok Mohiul, now that you ask..

my time is: 0:05.662 sec

Posted: Sun Feb 27, 2005 4:35 pm
Mine is 2.640 Secs

### Re: What is ur minimum time to generate prime in 20000000 ?

Posted: Sun Feb 27, 2005 11:33 pm
mohiul alam prince wrote:Hi
I want to know who take the minimum time to generate prime in 20000000.

what ever ur time ? please mention it if u have enough time.

MAP
How do you find out the time spent for generation of primes only? My time for problem 10394 is 2.373 sec, but I don't know how much time the input/output takes.

edit: now I saw that you submitted the prime generation code only to determine the time. How much time was spent at I/O? If you can tell us it, you will save us a lot of WA submissions.

Posted: Mon Feb 28, 2005 9:50 am
My time is not as good as shole or prince.
My sieve pirme code runs about 03.500sec in P-III 600Mhz computer(run time highly depends on computer config)
i test my codes run time by this following code:

Code: Select all

start=clock();
sieve_prime(1,20000000);
edn=clock();

coderun=(double)(start-end)/CLOCKS_PER_SEC;

printf("%lf\n",coderun);