prime number 썸네일형 리스트형 Problem 7 - Find the 10001st prime. 링크 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 10001st prime number? python def isprime(n): if n & 1 == 0: return False for x in range(3, int(n**0.5)+1, 2): if n % x == 0: return False return True count = 1 n = 2 while count < 10001: n = n + 1 if isprime(n): count = count + 1 print n python - speed up def isprime(n): if n == 1:.. 더보기 Prime Path http://acm.pku.edu.cn/JudgeOnline/problem?id=3126 Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of security to change such things every now and then, to keep the enemy in the dark. — But look, I have chosen my number 1033 for good reasons.. 더보기 이전 1 다음