Page 1 of 2

What is ur minimum time to generate prime in 20000000 ?

Posted: Sun Feb 27, 2005 8:59 am
by mohiul alam prince
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. :D

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

MAP

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

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

MAP

faster

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

Posted: Sun Feb 27, 2005 2:25 pm
by mohiul alam prince
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
by Kamanashish
Hi Mohiul.

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

Posted: Sun Feb 27, 2005 2:54 pm
by mohiul alam prince
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
by Kamanashish
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....

:o

Posted: Sun Feb 27, 2005 3:07 pm
by A1
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
by mohiul alam prince
Hi
A1 and Kamanashish forget every thing.
please mention ur time.
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
by mohiul alam prince
HI
Is this possible to generate prime in 20000000 below .200 second. :o

MAP

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

my time is: 0:05.662 sec

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

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

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

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

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. :D

Posted: Mon Feb 28, 2005 9:50 am
by A1
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);