+ 7
PRIME NUMBERS LIST#callange#
Hi there! just for the fun of it ,write a code to print out the list of all prime numbers less than a certain value! Lets see who will go highest!! Happy Coding https://code.sololearn.com/cHgt6aag99I8/?ref=app
15 Answers
+ 8
check this java version i think you like!!
https://code.sololearn.com/c8KCZTNWXzC8/?ref=app
+ 3
i win. works up to n<11220046696331
https://code.sololearn.com/cQq22e5PF7wY/?ref=app
+ 3
Thaks for your effort.
Be Well
and
Happy Coding
+ 2
I could go upto primes less than 14500 when the stars were perfectly alighned and the wind and tide were favourable!
:- )
15000 with the help of some luck.
Solo learn IDE is the bench mark!
+ 2
I tried to make it twice as fast.I could only once get upto 20,000 .And 25,000 when the connection was good.
https://code.sololearn.com/ct5H3HqzBxht/?ref=app
+ 2
It is noteworthy that when square root is introduced into the code as below ; Code will give time limit around 5500 whereas the code (2) would go upto 20000.
I just hope that sololearn IDE works independent of internet speed and I have not waisted everybodies time.
Happy Coding
https://code.sololearn.com/cBLj66I3xJAp/?ref=app
+ 1
https://code.sololearn.com/c8tfg3EUscNT/?ref=app
+ 1
My executes different theory of prime numbers, not as fast as you guys though...
https://code.sololearn.com/cSDpaE2zNtjZ/#py
+ 1
https://code.sololearn.com/cX3s5Z60JFhS/?ref=app
+ 1
https://code.sololearn.com/cGQRSBHN2UPH/?ref=app
0
2^77217932-1. if you find bigger you win 150.000 $
0
All prime numbers in interval. Input begin and end of interval.
https://code.sololearn.com/cMC3JLRv0T04/?ref=app
0
https://code.sololearn.com/cJc7ZrQFexKa/?ref=app
Updated.
0
Very strange, but this code runs a little faster than my previous one. The previous code produced numbers up to 13000, and this one up to 13500.
Although here I did not apply almost any optimization, divided into odd ones. And in previous code, I only divided into the already found prime numbers. It is possible that the overhead of organizing an array of found prime numbers exceeded the savings from a reduction in the number of divisions.
https://code.sololearn.com/cBF6i9cbOh3c/?ref=app