Sorunun orjinali:
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
# Projecteuler 7. soru def asalmı(sayı): karekok=int(sayı**(1/2)) for i in range(3,karekok+1,2): if sayı%i==0: return False return True sayac = 1 asalSayac = 1 while True: sayac += 2 if asalmı(sayac): asalSayac+=1 if asalSayac==10001: break print("10001. asal sayı =", sayac)
1.095 Gösterim
İlk Yorumu Siz Yapın