Tutto Sul Computer [Computer & Streaming]

Reply
Eulero Project n*7
icon11  view post Posted on 5/11/2009, 15:37Quote
Avatar

Super Member

Group: Vice Admin
Posts: 1467
Location: localhost


Status: Offline: ultima azione eseguita il 30/12/2009, 16:43


CITAZIONE
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6^(th) prime is 13.

What is the 10001^(st) prime number?

Questa è la mia soluzione in python.
CODICE
max=10002
conta=0
now=1
primo=True
while conta!=max:
       for elemento in range(2,now):
               if now % elemento == 0:
                       primo = False
       if primo==True:
               print conta,now
               conta+=1
       now+=1
       primo=True

image

image

image

image

image




image
 
P_MSG P_EMAIL P_MSN Top
view post Posted on 12/11/2009, 21:57Quote
Avatar

Super Member

Group: Vice Admin
Posts: 1467
Location: localhost


Status: Offline: ultima azione eseguita il 30/12/2009, 16:43


ma caspita, l'ho postato in questo forum di informatica un bel po' di tempo fa, non interessa a nessuno? XD

image

image

image

image

image




image
 
P_MSG P_EMAIL P_MSN Top
1 replies since 5/11/2009, 15:37
 
Reply

load
Fast reply

 
 
 

Enable emoticons
Clickable Smilies
Show All


Nickname:      Email:



 

 
 




free counters
Affiliati™

--> Affiliazioni Speciali <--

Image Hosted by ImageShack.us Image Hosted by ImageShack.us Image Hosted by ImageShack.us Next Games Generation Image and video hosting by TinyPic






--> Affiliazioni <--

Image Hosted by ImageShack.us Contest Mania Universal Forum Square Enix Juventus Fans Enjoy Tutorialing! Image and video hosting by TinyPic Nuova Costituzione Italiana Image Hosted by ImageShack.us Image and video hosting by TinyPic Image Hosted by ImageShack.us tornei online Download City 2.0 World Forum
 


Tutto Sul Computer è pubblicato sotto Licenza Creative Commons.Una copia anche parziale del forum verrà punita legalmente.

Hypnotist Skin designed by Veralya of Art Pieces